0

Is it possible to inspect a chainer.Chain to retrieve the shape of input arrays it expects? I'd like to do this to reshape numpy arrays before inference.

Thanks!

Andre
  • 530
  • 3
  • 15
  • Do you mean you want to use `chainer.Chain` model developed by other one, and you don't know the expected input shape? You may refer `__call__` method of the model to see what is the first layer to be applied. For example if it is `L.Convolution2D`, the shape should be `(Minibatch, Ch, Height, Width)` – corochann Apr 19 '18 at 02:08
  • Kind of -- I'd like to inspect the Chain object (without reference to the code) to determine the expected input shape. Would I have to inspect the type of the first layer? – Andre Apr 19 '18 at 18:50

0 Answers0