Tensorflow-SegNet icon indicating copy to clipboard operation
Tensorflow-SegNet copied to clipboard

Can the model input size be variable?

Open ypflll opened this issue 6 years ago • 1 comments

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

ypflll avatar Mar 29 '18 07:03 ypflll

Solved in stackoverflow.

ypflll avatar Mar 30 '18 09:03 ypflll