No, freezing a layer refers to freeze its parameters and thus keep them fixed without any training. The layer would still be applied.
You’ve replaced the layer with an nn.Identity module, which will just return the inputs directly without manipulating the inputs in any way, so it would basically “remove” the original self.fc layer.