When i run python detect.py on your code it is showing a type error.
Using TensorFlow backend.
/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint8 = np.dtype([("qint8", np.int8, 1)])
/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint8 = np.dtype([("quint8", np.uint8, 1)])
/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint16 = np.dtype([("qint16", np.int16, 1)])
/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_quint16 = np.dtype([("quint16", np.uint16, 1)])
/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
_np_qint32 = np.dtype([("qint32", np.int32, 1)])
/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
np_resource = np.dtype([("resource", np.ubyte, 1)])
WARNING:tensorflow:From /home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/ops/resource_variable_ops.py:435: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.
Instructions for updating:
Colocations handled automatically by placer.
Traceback (most recent call last):
File "detect.py", line 123, in
shared_layers = nn.nn_base(img_input, trainable=True)
File "/home/dheeraj/dheeraj/cvpro1/ZSD_Release/keras_frcnn/resnet.py", line 180, in nn_base
x = FixedBatchNormalization(axis=bn_axis, name='bn_conv1')(x)
File "/home/dheeraj/anaconda3/lib/python3.7/site-packages/keras/engine/base_layer.py", line 463, in call
self.build(unpack_singleton(input_shapes))
File "/home/dheeraj/dheeraj/cvpro1/ZSD_Release/keras_frcnn/FixedBatchNormalization.py", line 30, in build
trainable=False)
File "/home/dheeraj/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/dheeraj/anaconda3/lib/python3.7/site-packages/keras/initializers.py", line 46, in call
return K.constant(1, shape=shape, dtype=dtype)
File "/home/dheeraj/anaconda3/lib/python3.7/site-packages/keras/backend/tensorflow_backend.py", line 649, in constant
value, dtype=dtype, shape=shape, name=name)
File "/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/backend.py", line 783, in constant
return constant_op.constant(value, dtype=dtype, shape=shape, name=name)
File "/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 245, in constant
allow_broadcast=True)
File "/home/dheeraj/anaconda3/lib/python3.7/site-packages/tensorflow/python/framework/constant_op.py", line 283, in _constant_impl
allow_broadcast=allow_broadcast))
File "/home/dheeraj/anaconda3/lib/python3.7/site-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 "<array_function internals>", line 6, in prod
File "/home/dheeraj/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 2962, in prod
keepdims=keepdims, initial=initial, where=where)
File "/home/dheeraj/anaconda3/lib/python3.7/site-packages/numpy/core/fromnumeric.py", line 90, in _wrapreduction
return ufunc.reduce(obj, axis, dtype, out, **passkwargs)
TypeError: int() argument must be a string, a bytes-like object or a number, not 'NoneType'
How can i rectify this error?