You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having issues getting this implementation running. How downloaded the pretrained model and the tensorflow vgg net, the ixtoword dict, and given correct paths.
When attempting to run the Ipython demo aswell as the test_ft() in model I get the below error?
Anyone else encounter this or have a solution?
Thanks,
Joe
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.pyc in convert_to_tensor(value, dtype, name, as_ref, preferred_dtype)
655
656 if ret is None:
--> 657 ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
658
659 if ret is NotImplemented:
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.pyc in make_tensor_proto(values, dtype, shape)
352 else:
353 _AssertCompatible(values, dtype)
--> 354 nparray = np.array(values, dtype=np_dt)
355 # check to them.
356 # We need to pass in quantized values as tuples, so don't apply the shape
ValueError: setting an array element with a sequence.
The text was updated successfully, but these errors were encountered:
Having issues getting this implementation running. How downloaded the pretrained model and the tensorflow vgg net, the ixtoword dict, and given correct paths.
When attempting to run the Ipython demo aswell as the test_ft() in model I get the below error?
Anyone else encounter this or have a solution?
Thanks,
Joe
ValueError Traceback (most recent call last)
in ()
31
32
---> 33 fc7_tf, generated_words_tf = caption_generator.build_generator(maxlen=maxlength)
34
35 saver = tf.train.Saver()
/home/joe/edsproject/show_and_tell.tensorflow/model.pyc in build_generator(self, maxlen)
91 image_emb = tf.matmul(image, self.encode_img_W) + self.encode_img_b
92
---> 93 state = tf.zeros([1, self.lstm.state_size])
94 #last_word = image_emb # 첫 단어 대신 이미지
95 generated_words = []
/usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/array_ops.pyc in zeros(shape, dtype, name)
1182 output = constant(zero, shape=shape, dtype=dtype, name=name)
1183 except (TypeError, ValueError):
-> 1184 shape = ops.convert_to_tensor(shape, dtype=dtypes.int32, name="shape")
1185 output = fill(shape, constant(zero, dtype=dtype), name=name)
1186 assert output.dtype.base_dtype == dtype
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/ops.pyc in convert_to_tensor(value, dtype, name, as_ref, preferred_dtype)
655
656 if ret is None:
--> 657 ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
658
659 if ret is NotImplemented:
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.pyc in _constant_tensor_conversion_function(v, dtype, name, as_ref)
178 as_ref=False):
179 _ = as_ref
--> 180 return constant(v, dtype=dtype, name=name)
181
182
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.pyc in constant(value, dtype, shape, name)
161 tensor_value = attr_value_pb2.AttrValue()
162 tensor_value.tensor.CopyFrom(
--> 163 tensor_util.make_tensor_proto(value, dtype=dtype, shape=shape))
164 dtype_value = attr_value_pb2.AttrValue(type=tensor_value.tensor.dtype)
165 const_tensor = g.create_op(
/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.pyc in make_tensor_proto(values, dtype, shape)
352 else:
353 _AssertCompatible(values, dtype)
--> 354 nparray = np.array(values, dtype=np_dt)
355 # check to them.
356 # We need to pass in quantized values as tuples, so don't apply the shape
ValueError: setting an array element with a sequence.
The text was updated successfully, but these errors were encountered: