Solved by RoySadaka in post #6 
              
              
                Your code will work with CloningLinear (again, hope i understand what you try to do) 
import torch.nn as nn
import torch.nn.functional as F
import torch

class CloningLinear(nn.Linear):
    def forward(self, inputs):
        return F.linear(inputs, self.weight.clone(), self.bias.clone())

class Mode…