阿里雲深度學習平臺試玩
1,第一個圖片分類cifar-10程式碼中可以看出,(在本地跑)引數是這樣傳進伺服器的:
python cifar_pai.py --buckets /Users/kylefan/program/cifar-10/cifar-10-batches-py --checkpointDir /Users/kylefan/program/cifar-10/checkpoint
其中–buckets對應下圖的資料庫目錄:
也就是說函式裡得有個引數是–buckets,然後在上圖制定OSS中的目錄。所以修改原生代碼使其含有一個引數–buckets。
2,多個原始檔需要壓縮成tar.gz並指定主檔案
壓縮:(注意folder_to_compress不要使用絕對路徑不然壓縮包裡的檔案也會沿用這個目錄結構)
tar -zcvf archive_name.tar.gz folder_to_compress
報錯:
Traceback (most recent call last):
File “AlexNet/AlexNetArg.py”, line 152, in
tf.app.run(main=main)
File “/usr/lib/python2.7/site-packages/tensorflow/python/platform/app.py”, line 44, in run
_sys.exit(main(_sys.argv[:1] + flags_passthrough))
File “AlexNet/AlexNetArg.py”, line 80, in main
mnist = input_data.read_data_sets(dirname, one_hot=True)
File “/usr/lib/python2.7/site-packages/tensorflow/contrib/learn/python/learn/datasets/mnist.py”, line 212, in read_data_sets
with open(local_file, ‘rb’) as f:
IOError: [Errno 2] No such file or directory: ‘oss://kylefan/Alexnet/MNIST_data/train-images-idx3-ubyte.gz’
意思是OSS裡沒有oss://kylefan/Alexnet/MNIST_data/train-images-idx3-ubyte.gz這個檔案,但是明明有。。。。待定