2017-06-02 26 views
0

當我使用蟒蛇和執行從動作檢測算法ActionVLADrun.sh文件安裝TensorFlow r0.12:TensorFlow錯誤「無法從Feed中獲取元素作爲字節」使用ActionVLAD

tensorflow.python.framework.errors_impl.InternalError: 
Unable to get element from the feed as bytes. 

Traceback (most recent call last): 
File "get_class.py", line 7, in 
with h5py.File(sys.argv[1], 'r') as fin, open(sys.argv[2], 'r') as fin2: 
File "/Users/wuhaoyang/anaconda2/envs/tf_v0.12.0rc0/lib/python2.7/site-packages/h5py/_hl/files.py", line 271, in init 
fid = make_fid(name, mode, userblock_size, fapl, swmr=swmr) 
File "/Users/wuhaoyang/anaconda2/envs/tf_v0.12.0rc0/lib/python2.7/site-packages/h5py/_hl/files.py", line 101, in make_fid 
fid = h5f.open(name, flags, fapl=fapl) 
File "h5py/_objects.pyx", line 54, in h5py._objects.with_phil.wrapper (/private/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/pip-wdzlRM-build/h5py/_objects.c:2840) 
File "h5py/_objects.pyx", line 55, in h5py._objects.with_phil.wrapper (/private/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/pip-wdzlRM-build/h5py/_objects.c:2798) 
File "h5py/h5f.pyx", line 78, in h5py.h5f.open (/private/var/folders/my/m6ynh3bn6tq06h7xr3js0z7r0000gn/T/pip-wdzlRM-build/h5py/h5f.c:2117) 
IOError: Unable to open file (Unable to open file: name = '/tmp/actionvlad-demo/feats.h5', errno = 2, error message = 'no such file or directory', flags = 0, o_flags = 0) 

我該如何解決這個問題,並使ActionVLAD與TensorFlow r0.12一起工作?

回答

0

請參閱Github上關閉的問題#3

問題是,預先訓練的模型的輸入路徑設置不正確,因此TensorFlow無法加載預先訓練的模型。解決方法是將文件demo/ext_feats.sh中的--checkpoint_path更改爲下載的檢查點文件。這已在this commit中修復。