# Framework API

This is the primary Java API for building and training neural networks with TensorFlow.
This API deliberately mirrors the overall structure of Python Keras. However, it
is intended as a comfortable, idiomatic Java API for developers who may or may not
be familiar with Keras.

This API is intended to provide convenient, sensible defaults, while still allowing you to 
exercise fine control over the details of your model, training, and inference when necessary.

More specifically, the following goals drive API evolution:

* If either you know how to implement a model in the Python Keras API, or you are reimplementing an 
  existing Python Keras model in Java, you should be able to cleanly and naturally follow the same 
  high-level structure in the framework API.

* Also, given some familiarity with patterns followed throughout the framework API, you should be 
  able to easily translate every detail of a Python Keras implementation into the framework API.

* However, the framework API is not intended to literally mimic the Python Keras API. Rather, it 
  should expose the same capabilities in an API that feels natural and idiomatic to a Java 
  programmer who does not know Keras. If we ever find ourselves unable to reconcile this goal with 
  easy translation from Python Keras, we may split out a Keras layer.

* Also, the framework API should support fine control over all aspects of modeling, training, and 
  inference. Unlike with Python Keras, we want this to feel like staying in the same API rather 
  than diving into a separate layer. But here again, if we are ever unable to reconcile this goal 
  with easy translation from Python Keras, we may split the framework API into two layers.