问题
I've trained a Tensorflow model on Google Colab, and saved that model in ".ckpt" format. I want to download the model so I tried to do this:
from google.colab import files
files.download('/content/model.ckpt.index')
files.download('/content/model.ckpt.meta')
files.download('/content/model.ckpt.data-00000-of-00001')
I was able to get meta and index files. However, data file is giving me the following error:
"MessageError: Error: Failed to download: Service Worker Response Error"
Could anybody tell me how should I solve this problem.
回答1:
Google Colab doesn't allow downloading files of large sizes (not sure about the exact limit). Possible solutions could be to either split the file into smaller files or can use github to push your files and then download to your local machine.
回答2:
I just tried with a 17 Mb graph file using the same command syntax with no error. Perhaps a transient problem on Google's servers?
回答3:
For me it helped to rename the file before download. I had a file named
26.9766_0.5779_150-Adam-mean_absolute_error#3#C-8-1-....-RL#training-set-6x6.04.hdf5
and renamed it to
model.hdf5
before download, then it worked. Maybe the '-' in the filename caused the error in my case.
来源:https://stackoverflow.com/questions/49284238/failed-to-download-ckpt-weights-from-google-colab