DVCLive allows you to easily add experiment tracking capabilities to your Keras projects.
Keras is a central part of the tightly-connected TensorFlow 2.0 ecosystem, covering every step of the machine learning workflow, from data management to hyperparameter training to deployment solutions.
To start using DVCLive you just need to add a few lines to your training code in any Keras project.
You just need to add the
to the callbacks list passed to your
+from dvclive.keras import DvcLiveCallback . . . model.fit( train_dataset, epochs=num_epochs, - validation_data=validation_dataset) + validation_data=validation_dataset, + callbacks=[DvcLiveCallback()])
This will generate the metrics logs and summaries as described in the Get Started.
💡Without requiring additional modifications to your training code, you can use DVCLive alongside DVC. See DVCLive with DVC for more info.
model_file- The name of the file where the model will be saved at the end of each
Falseby default) - if True, then only the model's weights will be saved (
model.save_weights(model_file)), else the full model is saved (
from dvclive.keras import DvcLiveCallback model.fit( train_dataset, epochs=num_epochs, validation_data=validation_dataset, callbacks=[DvcLiveCallback( model_file="my_model_weights.h5", save_weights_only=True)])
You can find a fully working example using the DVCLive and Keras in the following link: