I don’t know how MidGetter is defined, but IntermediateLayerGetter doesn’t accept the keep_output argument. In any case, I think you are seeing a difference, since AlexNet is using inplace nn.ReLU modules, which would manipulate the output of the previous layer inplace.