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
While running the code, I get this ValueError in yolo.py in line 28 :-
cell_x = tf.compat.v1.to_float(tf.reshape(tf.tile(tf.range(max_grid_w), [max_grid_h]), (1, max_grid_h, max_grid_w, 1, 1)))
cell_y = tf.transpose(cell_x, (0,2,1,3,4))
self.cell_grid = tf.tile(tf.concat([cell_x,cell_y],-1), [batch_size, 1, 1, 3, 1])
The full error message:-
Traceback (most recent call last):
File "train.py", line 293, in main(args)
File "train.py", line 238, in main
train_model, infer_model = create_model(
File "train.py", line 145, in create_model
template_model, infer_model = create_yolov3_model(
File "C:\Users\vigne\yolo.py", line 300, in create_yolov3_model
loss_yolo_1 = YoloLayer(anchors[12:],
File "C:\Users\vigne\yolo.py", line 28, in init
self.cell_grid = tf.tile(tf.concat([cell_x,cell_y],-1), [batch_size, 1, 1, 3, 1])
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 11453, in tile
return tile_eager_fallback(
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 11490, in tile_eager_fallback
_attr_Tmultiples, (multiples,) = _execute.args_to_matching_eager([multiples], ctx, [_dtypes.int32, _dtypes.int64, ], _dtypes.int32)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\eager\execute.py", line 265, in args_to_matching_eager
tensor = ops.convert_to_tensor(t, ctx=ctx)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\profiler\trace.py", line 163, in wrapped
return func(*args, **kwargs)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1540, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 339, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 264, in constant
return _constant_impl(value, dtype, shape, name, verify_shape=False,
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 276, in _constant_impl
return _constant_eager_impl(ctx, value, dtype, shape, verify_shape)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 301, in _constant_eager_impl
t = convert_to_eager_tensor(value, ctx, dtype)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 98, in convert_to_eager_tensor
return ops.EagerTensor(value, ctx.device_name, dtype)
ValueError: Can't convert Python sequence with mixed types to Tensor.
Any suggestion or solution would be helpful. Thanks
The text was updated successfully, but these errors were encountered:
While running the code, I get this ValueError in yolo.py in line 28 :-
cell_x = tf.compat.v1.to_float(tf.reshape(tf.tile(tf.range(max_grid_w), [max_grid_h]), (1, max_grid_h, max_grid_w, 1, 1)))
cell_y = tf.transpose(cell_x, (0,2,1,3,4))
self.cell_grid = tf.tile(tf.concat([cell_x,cell_y],-1), [batch_size, 1, 1, 3, 1])
The full error message:-
Traceback (most recent call last):
File "train.py", line 293, in
main(args)
File "train.py", line 238, in main
train_model, infer_model = create_model(
File "train.py", line 145, in create_model
template_model, infer_model = create_yolov3_model(
File "C:\Users\vigne\yolo.py", line 300, in create_yolov3_model
loss_yolo_1 = YoloLayer(anchors[12:],
File "C:\Users\vigne\yolo.py", line 28, in init
self.cell_grid = tf.tile(tf.concat([cell_x,cell_y],-1), [batch_size, 1, 1, 3, 1])
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 11453, in tile
return tile_eager_fallback(
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\ops\gen_array_ops.py", line 11490, in tile_eager_fallback
_attr_Tmultiples, (multiples,) = _execute.args_to_matching_eager([multiples], ctx, [_dtypes.int32, _dtypes.int64, ], _dtypes.int32)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\eager\execute.py", line 265, in args_to_matching_eager
tensor = ops.convert_to_tensor(t, ctx=ctx)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\profiler\trace.py", line 163, in wrapped
return func(*args, **kwargs)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 1540, in convert_to_tensor
ret = conversion_func(value, dtype=dtype, name=name, as_ref=as_ref)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 339, in _constant_tensor_conversion_function
return constant(v, dtype=dtype, name=name)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 264, in constant
return _constant_impl(value, dtype, shape, name, verify_shape=False,
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 276, in _constant_impl
return _constant_eager_impl(ctx, value, dtype, shape, verify_shape)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 301, in _constant_eager_impl
t = convert_to_eager_tensor(value, ctx, dtype)
File "C:\Users\vigne\anaconda3\lib\site-packages\tensorflow\python\framework\constant_op.py", line 98, in convert_to_eager_tensor
return ops.EagerTensor(value, ctx.device_name, dtype)
ValueError: Can't convert Python sequence with mixed types to Tensor.
Any suggestion or solution would be helpful. Thanks
The text was updated successfully, but these errors were encountered: