Hi guys I am trying to use conv2d_transpose as upscaling op (with nearest interpolation), although there’s a special op for that.
In my case, trying to upscale 2x2 so in order to keep the number of input/output channels the same, I’m using groups=num of channels.
For example: input: 1x2x2x2 output: 1x2x4x4
I believe the weights should be ones with shape 2x1x2x2
But I get an error with type checker:
def @main(%input: Tensor[(1, 2, 2, 2), float32] /* ty=Tensor[(1, 2, 2, 2), float32] */) -> Tensor[(1, 2, 4, 4), float32] {
nn.conv2d_transpose(%input, meta[relay.Constant][0], strides=[2, 2], padding=[0, 0, 0, 0], groups=2)
}
The weights: weight.data.shape (2, 1, 2, 2)
The error:
The Relay type checker is unable to show the following types match:
Tensor[(1, 1, 4, 4), float32]
Tensor[(1, 2, 4, 4), float32]
In particular:
dimension 1 conflicts: 1 does not match 2.
The Relay type checker is unable to show the following types match.
In particular Tensor[(1, 2, 4, 4), float32]
does not match Tensor[(1, 1, 4, 4), float32]
Am I doing something wrong? Is this a bug?