Hello,
First of all, if this is a duplicate I am deeply sorry. Could not find the reason behind this behavior of torch nn.Conv2d. The following code results in invalid combination of argument - got (Tensor, int, int, int)
T = (4,4)
T_times = 10
test_layer = nn.Conv2d(in_channels=256, out_channels=T_times*(torch.prod(torch.tensor(T, dtype=torch.float))), kernel_size=1)
However,
If I do the same operations with numpy as given below, there happens to be no problem. Is there anything I am missing?
test_layer = nn.Conv2d(in_channels=256, out_channels=T_times*(np.prod(T)), kernel_size=1)
Thanks in advance!
Barış