ptrblck:

with torch.no_grad():


In the training, Do I need to use these lines:
with torch.no_grad():
    for idx, lin in enumerate(lins):
        lin.weight = nn.Parameter(conv.weight[idx])
        lin.bias = nn.Parameter(conv.bias[idx].unsqueeze(0))

Or you just make it to check the output of convolution and linear are equally. Finally, the training just use
lins = [nn.Linear(4, 1) for _ in range(8)]
outputs = torch.stack([lin(input_concat[:, idx]) for idx, lin in enumerate(lins)], 1)