Hi, im trying to get the activations from a specific layer using the dnn module. Specifically the forward() method, since that seems to be the only method that does this. If i understand the documentation correctly, the following code should give me the output for every Layer.
names = self.net.getLayerNames()
outputs = self.net.forward(names)
the result is a set of arrays. However, when i look at the values in these arrays they don't seem to be quite right. For example, my 3d layer is a relu layer, which should output max(0,input), but the array contains negative values.
So my question is:
- what exactly am i looking at in the
forward() output if its not the
output of each layer, - and how can i get the activations of each layer using the dnn module?**