In torch when we train our model for a image the model can store the output in model. Is it also possible to store the output in pytorch model after train the image?
In torch we can access the output after train model as like given example …
out = model:forward(input)
suppose there is 10 modules in the model and I want to access the output of 5th layer in this case
layer_5 = model.modules[5].output
Like this is it possible in pytorch too. If not how will do the same in pytorch.
Hi @ptrblck how can I store each layer (internal or external) out put as they calculate forward pass. I am not using name of each layer I want to store according to indexing of of each layer.
In my model there is layer in side layer also present.
Note, that I removed ConcatTable and CAddTable, as they are classes from Torch7, which is not under active development anymore. I would therefore recommend to switch to PyTorch.
Have a look at the website for install instructions, if you haven’t already installed it.