Decathlon / Decathlon/decavision
TF .pb wont save in Colab local
- Dominant language
- Python
- Stars
- 4
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
To save in Colab, we need to add some lines if we train with TPU because it usually requires to be saved to a Bucket. To overcome the use of a Bucket, add the `SaveOptions` as follows to the `fit() `function:
```
if export_model:
save_locally = tf.saved_model.SaveOptions(experimental_io_device='/job:localhost')
self.model.save(export_model, options=save_locally)
print('Model exported')
```
Contributor guide
Research direction
Review the training code around the fit() function and its export_model path, then inspect linked pull request #30 for the work already underway. Verify the requested SaveOptions behavior in a Colab TPU run; done means a .pb SavedModel is written locally without requiring a bucket.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, tensorflow
- Domain
- cloud, machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100