Tensorflow-SegNet
Tensorflow-SegNet copied to clipboard
Can the model input size be variable?
As your code, you have a fixed input size of 360*480. How to change the code to be used to arbitrary input size?
I tried to change the train_data_node's shape to none:
train_data_node = tf.placeholder( tf.float32, shape=[batch_size, None, None, 3])
But this will raise an error when unpool/deconv_layer: TypeError: unsupported operand type(s) for *: 'NoneType' and 'int'.
Cause the size after unpool should be input_size*2, when input_size is none, this can't be calculated. Any way to implement this? A similar question on stack overflow: https://stackoverflow.com/questions/49549894/in-tensorflow-encoder-decoder-model-like-fcn-segnet-how-to-give-arbitrary-inpu
Solved in stackoverflow.