Hello,
I’m trying to convert my model via jit.trace(). I’m currently using the spconv library for my Network. Training the network works fine and with no errors, but using jit.trace() throws a size mismatch error.
Here are the layers of my model:
self.net = spconv.SparseSequential(
spconv.SparseConv2d(1, 64, 1),
nn.PReLU(),
spconv.SparseConv2d(64, 256, 2, padding=(1, 0)),
nn.PReLU(),
spconv.SparseConv2d(256, 512, 2, padding=(1, 0)),
nn.PReLU(),
spconv.SparseConv2d(512, 256, 2, padding=(0, 1)),
nn.PReLU(),
spconv.SparseConv2d(256, 64, 2, padding=(0, 1)),
nn.PReLU(),
spconv.SparseConv2d(64, 1, 1),
# nn.Tanh(),
)
Here is the error message:
RuntimeError: size mismatch, m1: [375 x 375], m2: [1 x 64] at /pytorch/aten/src/THC/generic/THCTensorMathBlas.cu:290
The input consists of 375x375 matrices. The network operates on CUDA.
Maybe someone has an idea why this error comes up.
Thank you