Add manual model tracking example

This commit is contained in:
allegroai 2020-06-17 01:01:31 +03:00
parent 9ee596f48b
commit a51a1be320

View File

@ -2,7 +2,7 @@
#
import os
from trains import Task
from trains import Task, OutputModel
task = Task.init(project_name='examples', task_name='Model configuration example')
@ -31,6 +31,9 @@ model_config_dict['value'] *= model_config_dict['new value']
labels = {'background': 0, 'cat': 1, 'dog': 2}
task.connect_label_enumeration(labels)
# Manually log a local model file
OutputModel().update_weights('my_best_model.bin')
# storing a model: Any saved model (keras / pytorch / tensorflow / etc.)
# will have the task network configuration and label enumeration
print('Any model stored from this point onwards, will contain both model_config and label_enumeration')