-
Notifications
You must be signed in to change notification settings - Fork 19.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fully convolutional neural network in Keras #2087
Comments
What are |
resize2d crop or pad the input to a certain size, the size is not pre defined value, it is defined in the running time cause fully convolution network can work with any size. Convolution_shape is a modified version of convolutional layer which does not requires fixed input size. I think fully convolutional neural network does have max pooling layer. |
Okay, you have 2x max-pool and 2x upsample, so the sizes already match even w/o resize2d as long as you only make sure that the inputs are a multiple of 4 on both sizes.
It's called fully convolutional for a reason... :D |
yes they can work with any size in the input. But if one of your layers are doing some size specific work, they might crash right? This is a good question though. Maxpooling is not totally incompatible with that approach. On the other hand, try to limit yourself to use |
Yes it will crash for size specific layer, but the core of Fcn is avoiding such operation. I think resize2d is necessary because the size of testing images are totally out of control. I also wondering why Json string is necessary. Reconstructing model from Json string is not faster than recompile it at all. What do you think? |
That makes me remember... I could contribute my implementation for fractionally-strided/transposed convolutions (aka "deconvolution").
But they are in your control.
It's only necessary if you want to use the model without having to have the code that builds it. Otherwise it's sufficient to load/save just the weights. |
@NasenSpray pooling and upsampling don't necessary give you the original size. Think 5 * 5 input, after applying max-pooling, it becomes 2* 2, upsampling it back gives you 4*4. |
@shampool: I know, that's why I said
You can crop/pad the images to that size before you feed them to the network. |
That's not a good idea, because it needs you carefully design the size of inputs to make sure every successive max-pooling layers are reversible, which is not flexible and tending to make mistake. |
As far as I know, thw FCNs have pooling, if you look the Caffe model you'll see it: https://gist.github.com/longjon/1bf3aa1e0b8e788d7e1d#file-readme-md |
@NasenSpray Regarding your implementation of deconvolution - it will be nice to see. |
The problem is that the argument of Resize2D:
model.get_node('conv_1').output_shape
is not a constant, so it can not be dumped into a json string.I may use an integer to trace back to the specific layer, but it will be easily messed up when the number of layers is large.
Any suggestions to solve this?
The text was updated successfully, but these errors were encountered: