Solved by Sayed_Nadim in post #6 
              
              
                The easiest solution would be to put spectral_norm around the nn.Conv2d calls inside your Myconvo2d class. For example, 
import torch
from torch import nn
from torch.nn.utils import spectral_norm


class MyConvo2d(nn.Module):
    def __init__(self, in_channels, out_channels):
        super().__init_…