yes, you can operate on particular out variables,  and return them.
For example:
def forward(self, x):
        out1 = self.conv1(x)
        out2 = self.layer1(out1)
        out3 = self.layer2(out2)
        out = self.layer3(out3)
        out = F.relu(self.bn1(out))
        out = F.avg_pool2d(out, 8)
        out = out.view(out.size(0), -1)
        out = self.linear(out)


        norm = (out3 - out2).norm(2)
    
        return out, norm

out, norm = model(input)
cross_entropy = criterion(out, target)
(cross_entropy + norm).backward()