hello, i have a question. while StreamConvTranspose2d setting is follow, it have error. this is test code:
equivalent_conv =StreamConvTranspose2d(
in_channels=in_channels,
out_channels=hidden_channels,
# kernel_size = 1,
kernel_size=(1,5),
stride=(1,2),
padding=(0,2),
groups= 2
)
original_layer = nn.ConvTranspose2d(
in_channels=in_channels,
out_channels=hidden_channels,
# kernel_size = 1,
kernel_size=(1,5),
stride=(1,2),
padding=(0,2),
groups= 2
)
x = torch.randn(1, in_channels, 16, 128)
convert_to_stream(equivalent_conv, original_layer)
y_original = original_layer(x)
y_equivalent = equivalent_conv(x)
print(np.shape(y_original))
print(np.shape(y_equivalent))
assert torch.allclose(y_original, y_equivalent, atol=1e-6)
i found groups =2 it is error, but groups = 1 ,it is not error.
hello, i have a question. while StreamConvTranspose2d setting is follow, it have error. this is test code:
equivalent_conv =StreamConvTranspose2d(
in_channels=in_channels,
out_channels=hidden_channels,
# kernel_size = 1,
kernel_size=(1,5),
stride=(1,2),
padding=(0,2),
groups= 2
)
original_layer = nn.ConvTranspose2d(
in_channels=in_channels,
out_channels=hidden_channels,
# kernel_size = 1,
kernel_size=(1,5),
stride=(1,2),
padding=(0,2),
groups= 2
)
x = torch.randn(1, in_channels, 16, 128)
convert_to_stream(equivalent_conv, original_layer)
y_original = original_layer(x)
y_equivalent = equivalent_conv(x)
print(np.shape(y_original))
print(np.shape(y_equivalent))
assert torch.allclose(y_original, y_equivalent, atol=1e-6)
i found groups =2 it is error, but groups = 1 ,it is not error.