diff --git a/examples/manual_model_config.py b/examples/manual_model_config.py index 7b3434a1..007dd130 100644 --- a/examples/manual_model_config.py +++ b/examples/manual_model_config.py @@ -1,5 +1,8 @@ # TRAINS - Example of manual model configuration # +import os +from tempfile import gettempdir + import torch from trains import Task @@ -25,5 +28,6 @@ task.set_model_label_enumeration({'background': 0, 'cat': 1, 'dog': 2}) print('Any model stored from this point onwards, will contain both model_config and label_enumeration') # storing the model, it will have the task network configuration and label enumeration -torch.save(model, '/tmp/model') + +torch.save(model, os.path.join(gettempdir(), "model")) print('Model saved') diff --git a/examples/requirements.txt b/examples/requirements.txt index 4e8101e5..c63b5e2c 100644 --- a/examples/requirements.txt +++ b/examples/requirements.txt @@ -1,7 +1,8 @@ absl-py>=0.7.1 Keras>=2.2.4 joblib>=0.13.2 -matplotlib>=3.1.1 +matplotlib>=3.1.1 ; python_version >= '3.6' +matplotlib == 3.0.3 ; python_version < '3.6' seaborn>=0.9.0 sklearn>=0.0 tensorboard>=1.14.0