Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

dnn module forward() output in intermediate layers?

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?**

dnn module forward() output in intermediate layers?

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 activations of each layer using the dnn dnn module?**

dnn module forward() output in intermediate layers?

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?**module?
click to hide/show revision 4
retagged

updated 2019-10-19 05:27:39 -0600

berak gravatar image

dnn module forward() output in intermediate layers?

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?

dnn module forward() output in intermediate layers?

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?
click to hide/show revision 6
retagged

updated 2019-10-20 02:50:25 -0600

berak gravatar image

dnn module forward() output in intermediate layers?

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?