-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python detect.py causng error #9
Comments
Hi, I have the same problem. Did you find the solution? |
When the tensorflow and keras version are higher than the requirements provided by author. |
When I do:
python detect.py Dataset/Sampleinput/input.png,
I get the following error:
Traceback (most recent call last):
File "detect.py", line 123, in
shared_layers = nn.nn_base(img_input, trainable=True)
File "/data2/charades2/ZSD_Release/keras_frcnn/resnet.py", line 182, in nn_base
x = FixedBatchNormalization(axis=bn_axis, name='bn_conv1')(x)
File "/home/user/anaconda3/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 75, in symbolic_fn_wrapper
return func(*args, **kwargs)
File "/home/user/anaconda3/lib/python3.7/site-packages/keras/engine/base_layer.py", line 463, in call
self.build(unpack_singleton(input_shapes))
File "/data2/charades2/ZSD_Release/keras_frcnn/FixedBatchNormalization.py", line 31, in build
trainable=False)
File "/home/user/anaconda3/lib/python3.7/site-packages/keras/engine/base_layer.py", line 279, in add_weight
weight = K.variable(initializer(shape, dtype=dtype),
File "/home/user/anaconda3/lib/python3.7/site-packages/keras/initializers.py", line 46, in call
return K.constant(1, shape=shape, dtype=dtype)
File "/home/user/anaconda3/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 649, in constant
value, dtype=dtype, shape=shape, name=name)
File "/home/user/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/keras/backend.py", line 937, in constant
return constant_op.constant(value, dtype=dtype, shape=shape, name=name)
File "/home/user/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/constant_op.py", line 258, in constant
allow_broadcast=True)
File "/home/user/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/constant_op.py", line 287, in _constant_impl
return _eager_fill(shape.as_list(), t, ctx)
File "/home/user/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/constant_op.py", line 52, in _eager_fill
dims = convert_to_eager_tensor(dims, ctx, dtypes.int32)
File "/home/user/anaconda3/lib/python3.7/site-packages/tensorflow_core/python/framework/constant_op.py", line 96, in convert_to_eager_tensor
return ops.EagerTensor(value, ctx.device_name, dtype)
ValueError: Attempt to convert a value (None) with an unsupported type (<class 'NoneType'>) to a Tensor.
Could you resolve this issue? I checked the shape is (None ,). That might be causing the problem. My question is why shape is (None ,)?
The text was updated successfully, but these errors were encountered: