You don’t have to define all of your layers to be x. Try something like the following:
def forward(self, x):
      x1 = F.relu(F.max_pool2d(self.conv1(x), 2))
      x2 = F.relu(F.max_pool2d(self.conv2_drop(self.conv2(x1)), 2))
      x3 = F.relu(F.max_pool2d(self.conv3(x2), 2))
      x4 = F.relu(F.max_pool2d(self.conv4_drop(self.conv4(x3)), 2))

      x5 = x4.view(-1, 160)

      return x5

This way you can get at the output of the middle layers (x1 ... x4)