microsoft / CNTK

Microsoft Cognitive Toolkit (CNTK), an open source deep-learning toolkit
https://docs.microsoft.com/cognitive-toolkit/
Other
17.49k stars 4.3k forks source link

ConvolutionTranspose2D outputs normally when num_filters is tuple and dilation is 0 #3883

Open cheyennee opened 6 months ago

cheyennee commented 6 months ago

According to doc, the num_filters should be int and dilation should be a tuple. And in tensorflow and pytorch, the dilation should be greater than 0, but in following code, when dilation is 0, ConvolutionTranspose2D outputs normally.

f = C.layers.ConvolutionTranspose2D((3, 4), (1, 1), activation=C.relu, dilation=0)
x = C.input_variable((3, 480, 640))
h = f(x)
print(h.shape)
print(f.W.shape)
# (1, 1, 482, 643)
# (-1, 1, 1, 3, 4)