Hello,
I have some initial weights that I want to initialize a CNN layer with. The weights are of the shape (3,8,12). I defined a CNN layer as
conv1 = nn.Conv2d(3,8,kernel_size=(3,3), stride = 2)
I just guessed this initialization and that’s why I am getting the following error:
RuntimeError: Given weight of size [1, 3, 8, 12], expected bias to be 1-dimensional with 1 elements, but got bias of size [8] instead

My input is of size (3,244,244). Kindly let me know how can I initialize the CNN layer so that it accepts the weights.