The model structure is shown as follows.
class RouteNet(torch.nn.Module):
    def __init__(self):
        super(RouteNet, self).__init__()
        self.encode = torch.nn.Sequential(
            torch.nn.Conv2d(3, 32, 9, 1, 4),
            torch.nn.MaxPool2d(2, 2, 0, 1),
            torch.nn.Conv2d(32, 64, 7, 1, 3),
            torch.nn.MaxPool2d(2, 2, 0, 1),
            torch.nn.Conv2d(64, 32, 9, 1, 4))
        self.decode = torch.nn.Sequential(
            torch.nn.Conv2d(32, 32, 7, 1, 3),
            torch.nn.ConvTranspose2d(32, 16, 9, 2, 4, 1),
            torch.nn.Conv2d(16, 16, 5, 1, 2),
            torch.nn.ConvTranspose2d(16, 4, 5, 2, 2, 1),
            torch.nn.Conv2d(4, 1, 3, 1, 1))
 
    def forward(self, x):
        encode_out = self.encode(x)
        # res = conv_out.view(conv_out.size(0), -1)
        out = self.decode(encode_out)
        return out

when I use
for name, param in H_model.state_dict().items():
            print(name)
            print("requires_grad: ", param.requires_grad)

it shows
encode.0.weight
requires_grad:  False
encode.0.bias
requires_grad:  False
encode.2.weight
requires_grad:  False
encode.2.bias
requires_grad:  False
encode.4.weight
requires_grad:  False
encode.4.bias
requires_grad:  False
decode.0.weight
requires_grad:  False
decode.0.bias
requires_grad:  False
decode.1.weight
requires_grad:  False
decode.1.bias
requires_grad:  False
decode.2.weight
requires_grad:  False
decode.2.bias
requires_grad:  False
decode.3.weight
requires_grad:  False
decode.3.bias
requires_grad:  False
decode.4.weight
requires_grad:  False
decode.4.bias
requires_grad:  False

However if I use
for p in H_model.named_parameters():
            print("requires_grad: ", p[1].requires_grad)

it shows
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True
requires_grad:  True

I think maybe you are right but I don’t know what the requires_grad exactly are.