I have a train model,the architecture of the model as shown in the following:
def forward(self, x):
      x = F.relu(F.max_pool2d(self.conv1(x), 2))
      x = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x)), 2))
      x = F.relu(F.max_pool2d(self.conv3(x), 2))
      x = F.relu(F.max_pool2d(self.conv4_drop(self.conv4(x)), 2))

      x = x.view(-1, 160)

      return x

How can I get the middle layer’s output  of in the test processing?
Can anyone give me some suggestions?
Thank you so much.