I was reading a paper mentioning the use of a neural network model available in the Wolfram neural repository. The authors explained that they modified the model to use the average function in the pooling layers instead of the max function.
I naïvely thought I could do the same by just applying the rule Max -> Mean
to all pooling layers to get the same result, but I didn't succeed.
Here is the simplest possible example I could come up with to show you what I mean :
LinearLayer[2] /. 2 -> 3
Why doesn't this instruction return a LinearLayer with three outputs instead of two ? I feel like I'm missing something obvious but I don't see it :-/
PS. It seems that what I was initially looking for is NetReplacePart
.