API reference: Keras integration#
You can use a Neptune callback to capture model training metadata when using TensorFlow with Keras.
Captures model training metadata and logs them to Neptune.
To use this package, you need to have Keras or TensorFlow 2 installed on your machine.
||-||(required) An existing run reference, as returned by
||Namespace under which all metadata logged by the Neptune callback will be stored.|
||Save the model visualization. Requires pydot to be installed.|
||Log the metrics also for each batch, not only each epoch.|
Creating a Neptune run and callback#
Create a run:
If Neptune can't find your project name or API token
As a best practice, you should save your Neptune API token and project name as environment variables:
You can, however, also pass them as arguments when initializing Neptune:
Also works for
API token: In the bottom-left corner, expand the user menu and select Get my API token.
- Project name: in the top-right menu: → Edit project details.
If you haven't registered, you can also log anonymously to a public project (make sure not to publish sensitive data through your code!):
Instantiate the Neptune callback:
Pass the callback to the
callbacks argument of model.fit()
Logging with additional options#
neptune-tensorflow-keras repo on GitHub