Decathlon / Decathlon/decavision

TF .pb wont save in Colab local

Open
#27 0 comments 0 reactions 0 assignees Claimed by @BigJack325 View on GitHub
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.