Skip to content
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

TypeError: long() argument must be a string or a number, not 'NoneType' #56

Open
Qcatbot opened this issue May 7, 2020 · 0 comments
Open

Comments

@Qcatbot
Copy link

Qcatbot commented May 7, 2020

I use this to train my custom images... it gives me the following error. Please someone help me to fix it.

Traceback (most recent call last):
File "train_frcnn.py", line 145, in
shared_layers = nn.nn_base(img_input, trainable=True)
File "/content/drive/My Drive/FasterRCNN/FASTER_RCNN_1.1/FASTER_RCNN/keras_frcnn/resnet.py", line 189, in nn_base
x = FixedBatchNormalization(axis=bn_axis, name='bn_conv1')(x)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 551, in call
self.build(input_shapes[0])
File "/content/drive/My Drive/FasterRCNN/FASTER_RCNN_1.1/FASTER_RCNN/keras_frcnn/FixedBatchNormalization.py", line 30, in build
trainable=False)
File "/usr/local/lib/python2.7/dist-packages/keras/engine/topology.py", line 384, in add_weight
weight = K.variable(initializer(shape), dtype=K.floatx(), name=name)
File "/usr/local/lib/python2.7/dist-packages/keras/initializers.py", line 37, in call
return K.constant(1, shape=shape, dtype=dtype)
File "/usr/local/lib/python2.7/dist-packages/keras/backend/tensorflow_backend.py", line 314, in constant
return tf.constant(value, dtype=dtype, shape=shape, name=name)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 180, in constant_v1
allow_broadcast=False)
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/constant_op.py", line 284, in _constant_impl
allow_broadcast=allow_broadcast))
File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/tensor_util.py", line 463, in make_tensor_proto
if shape is not None and np.prod(shape, dtype=np.int64) == 0:
File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 2772, in prod
initial=initial)
File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 86, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
TypeError: long() argument must be a string or a number, not 'NoneType'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant