mila-iqia / blocks

A Theano framework for building and training neural networks
Other
1.16k stars 351 forks source link

Feedforward, convolutions, shape inferences #1053

Open dwf opened 8 years ago

dwf commented 8 years ago

It seems like we should

@ddtm raised the point that Torch does the last one, and I don't see any reason we shouldn't be able to achieve it either, if we become a bit more disciplined about our protocol surrounding shapes.

"Flat is better than nested", etc. etc.

@rizar Your thoughts would be appreciated. @bartvm yours too since you have experience with Torch.

rizar commented 8 years ago

Regarding input_dim and output_dim: not all the bricks that people work with are feedforward. Only feedforward bricks have those properties. For other bricks, get_dim makes a lot of sense.

I fully understand that being able to put Feedforward bricks in ConvolutionalSequence would make most convnet scripts a bit shorter. We should about how we can do it, put preferably without breaking the rest of the library :)

dwf commented 8 years ago

Yes, I'm aware. Convolutional bricks are an instance where input_dim and output_dim aliases make sense, though (and in fact input_dim is already an allocation argument!).

I agree we shouldn't, and I don't think we have to, break anything in particular to yield an object (probably a new one) that has the desirable shape inference properties.