I built a C3D network.
self.conv1 = nn.Conv3d(3, 64, kernel_size=(3, 3, 3), padding=(1, 1, 1))
self.pool1 = nn.MaxPool3d(kernel_size=(1, 2, 2), stride=(1, 2, 2))
self.conv2 = nn.Conv3d(64, 128, kernel_size=(3, 3, 3), padding=(1, 1, 1))
self.pool2 = nn.MaxPool3d(kernel_size=(2, 2, 2), stride=(2, 2, 2))
…
When I enter the color picture sequence can be normal stitching.
clip = np.array([resize(io.imread(frame), output_shape=(112, 200), preserve_range=True) for frame in clip])
clip = clip[:, :, 44:44+112, :]
But when I enter a grayscale image sequence£¬can cause
IndexError: too many indices for array
so I change it
clip = clip[:, :, 44:44+112]
so that can stitching.
Meanwhile I change network
self.conv1 = nn.Conv3d(1, 64, kernel_size=(3, 3, 3), padding=(1, 1, 1))
But still making mistakes
expected stride to be a single integer value or a list of 2 values to match the convolution dimensions, but got stride=[1, 1, 1]
Should I expand the channel and if so, how do I do it?