Versions
Save versions and models, run analysis results, and export models out of Tensorleap
Last updated
Save versions and models, run analysis results, and export models out of Tensorleap
Last updated
The Versions view is where you track all the saved versions and models of your project. From here, you can save versions and export models.
Click on the top left to open the Versions view. Once open, you can choose to fix the view by clicking .
The Versions view lists all versions of your project. Expanding each version shows a list of its related models.
To view the analysis results for a model, toggle the buttons to the left of the model. The stars to the right of the buttons light up, indicating the results are running.
Things to keep in mind when working with versions and models:
You can save a version of a network after creating a new or editing an existing one (see Save a Version).
Models are saved under versions. You need to expand a version to see the models under that version.
You can export a model out of Tensorleap into a common standard format (see Export a Model).
The demo video below shows the results of the analysis performed on a model.
Once you complete laying out a new network or making changes to an existing one, you can save it as a new version.
To save a network:
On the Versions view, enter a revision name.
Click Save to add the new version to the list in the Versions view.
By default, when you create a new project, Tensorleap also creates the first version within the master branch. If you want to override this initial version, mark the Override Current Version checkbox when saving a network. If not selected, a new version is added.
When training a network, you will be required to name the model (see Evaluate / Train Model). The model appears under the source network, where you can export it out of Tensorleap into a common standard format.
To export a trained model out of Tensorleap:
With the Versions view open, search for the model under your version.
On the Export Model window, select the format in which the model will be saved.
The job appears on the list to the right with status set to Pending. A notification message also appears briefly on your screen.
8. Once Tensorleap completes compiling the file, status is set to Finished.
If status is still set to Pending after some time, you may need to refresh the page to see the change in status to Finished.
The JSON format serializes the model layers, their properties and connectivity. It does not hold the state (weights) of the model.
Below is a code snippet for loading the exported JSON file:
More info at https://www.tensorflow.org/api_docs/python/tf/keras/models/model_from_json.
The h5
format serializes the model and model state (weights) as a single h5
file.
Below is a code snippet for loading the exported h5
file:
More info at https://www.tensorflow.org/tutorials/keras/save_and_load.
The onnx
format is commonly used in PyTorch for serializing the model's layers and state (weights).
Below is a code snippet for loading the exported onnx
file in PyTorch:
More info at https://pytorch.org/docs/stable/onnx.html.
This format uses the TensorFlow 2 SaveModel
format, and exports a folder with files containing the serialized model layers and state.
The serialized data is stored to a folder with this directory structure:
When downloading the SaveModel format from Tensorleap, the exported folder is contained within a compressed .gz
file.
To load the exported model, you must extract the .gz
file into a folder. One way to do it is by using tar
:
Below is a code snippet to load the model from the extracted folder:
More info at https://www.tensorflow.org/api_docs/python/tf/keras/models/save_model.
To start or continue training a specific version, position your cursor over that version, click on the right. (see Evaluate / Train Model).
Click on the left side of the Network view.
Hover your mouse on the model, then click on the right to open the Export Model window.
Click to start the export process.
9. Click to save the file to your computer.