如何将本地文件上传到Google Colab(Pickle)

时间:2018-09-18 12:50:45

标签: tensorflow pickle google-colaboratory

我有一个tensorflow程序,可以在猫和狗之间进行分类。我已经将数据存储在X.pickle和y.pickle中,但是当我将其导入google colab时,它给了我一个错误。 下面我给出了程序片段以及错误(注意,当我尝试使用jupyter笔记本做同样的事情时,我没有任何错误)

import pickle
pickle_in = 
open(r"C:/Users/manas/PycharmProjects/allProjects/X.pickle","rb")
X = pickle.load(pickle_in)

pickle_in = 
open(r"C:/Users/manas/PycharmProjects/allProjects/y.pickle","rb")
Y = pickle.load(pickle_in)






FileNotFoundError                         Traceback (most recent call last)
<ipython-input-42-9132fbd19d75> in <module>()
      1 import pickle
----> 2 pickle_in = 
open(r"C:/Users/manas/PycharmProjects/allProjects/X.pickle","rb")
      3 X = pickle.load(pickle_in)
      4 
      5 pickle_in = 
open(r"C:/Users/manas/PycharmProjects/allProjects/y.pickle","rb")

FileNotFoundError: [Errno 2] No such file or directory: 
'C:/Users/manas/PycharmProjects/allProjects/X.pickle'

0 个答案:

没有答案