I am implementing object detection using faster-RCNN Getting error:
ValueError: Input 0 is incompatible with layer res5a_branch2a: expected ndim=4, found ndim=5
for below network design
num_rois=4
roi_input = Input(shape=(num_rois, 4))
out_roi_pool = RoiPoolingConv(14, 3)([model2.output, roi_input])
reference RoiPoolingConv is user-defined function and output of out_roi_pool
<tf.Tensor 'roi_pooling_conv_49/transpose:0' shape=(1, 3, 14, 14, 2048)
dtype=float32>
pooling_regions = 14 #Size of pooling region
num_rois=4 #number of regions of interest
input_shape = (num_rois,14,14,1024)
nb_filter1, nb_filter2, nb_filter3 = [512,512,2048]
old_layer = TimeDistributed(Convolution2D(nb_filter1, (1, 1), strides=(1,1),
trainable=False, kernel_initializer='normal'),input_shape=out_roi_pool.shape, name='2b')(out_roi_pool )
Refered question link but still not able to resolved error.
source TimeDistributed Any leads much appreciated..!!