Unfortunately the result is the same with the following one,
test_layer = nn.Conv2d(in_channels=256, out_channels=T_times*(torch.prod( torch.tensor(T, dtype=torch.float) ).item()), kernel_size=1)
I have also tried doing the ops seperately just to make sure I do not have a silly mistake but the result is the same. I thought the scalar thing could be a solution for this:) It is not cumbersome to do it in numpy, but adding a package for just this operation requires a strong heart.