Solved by vmirly1 in post #2 
              
              
                You are using python list. If you wrap your layers into torch.nn.ModuleList then you can send the model to cuda: 
class DeepLinear(nn.Module):
    def __init__(self, dim: int, depth: int):
        super(DeepLinear, self).__init__()
        self.depth = depth
        self.linear = []
        for _ in…