Failed to download .ckpt weights from Google Colab

你离开我真会死。 提交于 2019-12-11 06:46:52

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!