I have a simple fully convolutional network and I'm trying to figure out why I get this error
NetChain::valfail: Validation failed for ConvolutionLayer: kernel size 3*3 plus padding size 0*0 cannot exceed input size 2*2.
when I uncomment the 6-8th layers (which should be totally valid) in the following net:
el = ElementwiseLayer["SELU"];
bn = BatchNormalizationLayer[];
n = NetInitialize[NetChain[{
ConvolutionLayer[24, {3, 3}], bn, el,
ConvolutionLayer[24, {3, 3}, "Dilation" -> 2], bn, el,
ConvolutionLayer[24, {3, 3}, "Dilation" -> 4], bn, el,
ConvolutionLayer[24, {3, 3}, "Dilation" -> 8], bn, el,
ConvolutionLayer[24, {3, 3}, "Dilation" -> 16], bn, el,
(*
ConvolutionLayer[24, {3,3},"Dilation" -> 32], bn, el,
ConvolutionLayer[24, {3,3},"Dilation" -> 64], bn, el,
ConvolutionLayer[24, {3,3},"Dilation" -> 128], bn, el,
*)
ConvolutionLayer[24, {3, 3}, "Dilation" -> 1], bn, el,
ConvolutionLayer[3, {1, 1}, "Dilation" -> 1]
},
"Input" -> NetEncoder[{"Image", ColorSpace -> "RGB"}],
"Output" -> NetDecoder[{"Image", ColorSpace -> "RGB"}]],
Method -> "Identity"];
n[ExampleData[{"TestImage", "Lena"}]]
It works without those three (dilations 32,64,128) layers: