equinox icon indicating copy to clipboard operation
equinox copied to clipboard

Consider moving `AdaptiveMaxPool3d -> AdaptivePool.max3d` (and similar)

Open patrick-kidger opened this issue 6 months ago • 0 comments

This is a general code cleanliness thing: it is not great style to have two classes that are not instantiable, with one inheriting from the other.

In this case, Adaptive{Avg,Max}Pool{1,2,3}d basically just provide custom initialisation for AdaptivePool, so we could consider moving them to a class constructor.

The same argument also applies to a few other NN layers like Conv, ConvTranspose, etc.

We could easily also set AdaptiveMaxPool3d = AdaptivePool.max3d to preserve backward compatibility.

patrick-kidger avatar Dec 09 '23 20:12 patrick-kidger