.in_features defines the input features of e.g. nn.Linear, while nn.Conv2d uses .in_channels to define the number of input channels.
Could you try this attribute and let me know, if this works for you?