I am just using TensorFlow to realise a CNN model called DVF: https://github.com/liuziwei7/voxel-flow.
The output of the model is 'deconv4' with the shape of [batch_size, 256, 256,3], then I need to extract optical flow using command:'flow = tf.slice(deconv4.outputs, [0,0,0,0], [batch_size, 256, 256, 2])'.
However, if the 'batch_size' is 'None', how do I slice the 'flow' tensor?
Thanks in advance.
The shape of 'deconv4' is [?,256,256,3] and I want to obtain the 'flow' with the shape of [?,256,256,2] from the 'deconv4'.
deconv4 = Conv2d(deconv3_bn_relu, 3, [5, 5], act=tf.tanh, padding='SAME', W_init=w_init, name='deconv4')
#################### Calculate Voxel Flow based on the 'deconv4' ############################
flow = tf.slice(deconv4.outputs, [0,0,0,0], [batch_size, 256, 256, 2])
The shape of 'flow' should be [?, 256,256,2]. But I am not sure how to obtain it.
None. - ARAT