YunseokJANG / tgif-qa

Repository for our CVPR 2017 and IJCV: TGIF-QA
https://arxiv.org/abs/1704.04497
171 stars 31 forks source link

ValueError: setting an array element with a sequence. #3

Closed shwetabhardwaj44 closed 6 years ago

shwetabhardwaj44 commented 6 years ago

Traceback (most recent call last): File "main.py", line 279, in main() File "main.py", line 118, in main model, model_params = init_model() File "main.py", line 274, in init_model model.build_graph(video, video_mask, question, question_mask, answer, train_flag) File "/scratch/tgif-qa/code/gifqa/models/count_models.py", line 97, in build_graph self.vid_initial_state = tf.zeros([self.batch_size, self.video_cell.state_size]) File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/tensorflow/python/ops/array_ops.py", line 1441, in zeros shape = ops.convert_to_tensor(shape, dtype=dtypes.int32, name="shape") File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 836, in convert_to_tensor as_ref=False) File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/ops.py", line 926, in internal_convert_to_tensor ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref) File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 229, in _constant_tensor_conversion_function return constant(v, dtype=dtype, name=name) File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/constant_op.py", line 208, in constant value, dtype=dtype, shape=shape, verify_shape=verify_shape)) File "/home/ubuntu/anaconda2/lib/python2.7/site-packages/tensorflow/python/framework/tensor_util.py", line 384, in make_tensor_proto nparray = np.array(values, dtype=np_dt)

YunseokJANG commented 6 years ago

Hi, Shweta.

I guess you may install wrong TF version, or some of your packages are not working. Your error tells us that 'convert_to_tensor' operation caused an error, which is unexpected behavior. So, I'd recommend you to re-check your environment.

Regards, Yunseok