ML Frameworks Integration

Overview

Neptune provides an easy integration with leading machine learning and deep learning libraries and frameworks.

Keras Integration

To integrate Neptune with Keras all you need to do is:

$ neptune send --ml-framework keras

You can also enable integration from within your code, like this:

import neptune
context = neptune.Context()
context.integrate_with_keras()

You can try it out on mnist_cnn.py from Keras examples.

Integration with Keras uses Keras Callbacks. Neptune adds on_epoch_end and on_batch_end callbacks and creates channels for all the metrics found in logs dict.

keras integration screenshot

TensorFlow Integration

To integrate Neptune with TensorFlow all you need to do is:

$ neptune send --ml-framework tensorflow

You can also enable integration from within your code, like this:

import neptune
context = neptune.Context()
context.integrate_with_tensorflow()

You can try it out on this Tensorflow example:

import tensorflow as tf

mnist = tf.keras.datasets.mnist
tensorboard = tf.keras.callbacks.TensorBoard(
    log_dir='./logs', write_graph=True, write_images=False)

(x_train, y_train),(x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0

model = tf.keras.models.Sequential([
  tf.keras.layers.Flatten(),
  tf.keras.layers.Dense(512, activation=tf.nn.relu),
  tf.keras.layers.Dropout(0.2),
  tf.keras.layers.Dense(10, activation=tf.nn.softmax)
])
model.compile(optimizer='adam',
              loss='sparse_categorical_crossentropy',
              metrics=['accuracy'])

model.fit(x_train, y_train, epochs=5, callbacks=[tensorboard])
model.evaluate(x_test, y_test)

Neptune automatically captures all the metrics reported by TensorFlow and creates channels for them.

tf integration screenshot

You can also see the graphs in TensorBoard tab:

tf integration tensorboard_screenshot

All summaries added via SummaryOperations will be available in Neptune.