|
| 1 | +# Framework API |
| 2 | + |
| 3 | +This is the primary Java API for building and training neural networks with TensorFlow. |
| 4 | +This API deliberately mirrors the overall structure of Python Keras. However, it |
| 5 | +is intended as a comfortable, idiomatic Java API for developers who may or may not |
| 6 | +be familiar with Keras. |
| 7 | + |
| 8 | +This API is intended to provide convenient, sensible defaults, while still allowing you to |
| 9 | +exercise fine control over the details of your model, training, and inference when necessary. |
| 10 | + |
| 11 | +More specifically, the following goals drive API evolution: |
| 12 | + |
| 13 | +* If either you know how to implement a model in the Python Keras API, or you are reimplementing an |
| 14 | + existing Python Keras model in Java, you should be able to cleanly and naturally follow the same |
| 15 | + high-level structure in the framework API. |
| 16 | + |
| 17 | +* Also, given some familiarity with patterns followed throughout the framework API, you should be |
| 18 | + able to easily translate every detail of a Python Keras implementation into the framework API. |
| 19 | + |
| 20 | +* However, the framework API is not intended to literally mimic the Python Keras API. Rather, it |
| 21 | + should expose the same capabilities in an API that feels natural and idiomatic to a Java |
| 22 | + programmer who does not know Keras. If we ever find ourselves unable to reconcile this goal with |
| 23 | + easy translation from Python Keras, we may split out a Keras layer. |
| 24 | + |
| 25 | +* Also, the framework API should support fine control over all aspects of modeling, training, and |
| 26 | + inference. Unlike with Python Keras, we want this to feel like staying in the same API rather |
| 27 | + than diving into a separate layer. But here again, if we are ever unable to reconcile this goal |
| 28 | + with easy translation from Python Keras, we may split the framework API into two layers. |
0 commit comments