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
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'
The text was updated successfully, but these errors were encountered:
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'
The text was updated successfully, but these errors were encountered: