2016-09-08 103 views
1
運行TensorBox複檢實施

我想我的機器上訓練TensorBox複檢實現(https://github.com/Russell91/TensorBox/)與一個GPU(NVIDIA公司的GeForce GTX 750 Ti)的。 當我運行train.py腳本:錯誤而在TensorFlow

python train.py --hypes hypes/overfeat_rezoom.json --gpu 0 --logdir output 

我得到以下錯誤:

Traceback (most recent call last): 
    File "train.py", line 543, in <module> 
    main() 
    File "train.py", line 540, in main 
    train(H, test_images=[]) 
    File "train.py", line 453, in train 
    smooth_op, global_step, learning_rate, encoder_net) = build(H, q) 
    File "train.py", line 346, in build 
    boxes_loss[phase]) = build_forward_backward(H, x, encoder_net, phase, boxes, flags) 
    File "train.py", line 245, in build_forward_backward 
    pred_confidences, pred_confs_deltas, pred_boxes_deltas) = build_forward(H, x, googlenet, phase, reuse) 
    File "train.py", line 167, in build_forward 
    lstm_outputs = build_lstm_inner(H, lstm_input) 
    File "train.py", line 50, in build_lstm_inner 
    state = tf.zeros([batch_size, lstm.state_size]) 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.py", line 1136, in zeros 
    shape = ops.convert_to_tensor(shape, dtype=dtypes.int32, name="shape") 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.py", line 628, in convert_to_tensor 
    ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 180, in _constant_tensor_conversion_function 
    return constant(v, dtype=dtype, name=name) 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 163, in constant 
    tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape)) 
    File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 354, in make_tensor_proto 
    nparray = np.array(values, dtype=np_dt) 
ValueError: setting an array element with a sequence. 

如果我運行的機器上相同的代碼沒有GPU,只是CPU上不會發生這種情況。

什麼可以此錯誤的原因是什麼?有什麼方法可以調試它嗎?

回答