Skip to content

Commit 174e53e

Browse files
committed
+ tensor_size correction with maintain_out_size
1 parent 87b54a3 commit 174e53e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

core/NeuralLayers/convolution.py

+3
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,9 @@ def __init__(self,
163163
if maintain_out_size:
164164
out_pad = (tensor_size[2]*strides[0] - self.tensor_size[2],
165165
tensor_size[3]*strides[1] - self.tensor_size[3])
166+
self.tensor_size = (tensor_size[0], out_channels,
167+
math.floor(h)+out_pad[0],
168+
math.floor(w)+out_pad[1])
166169
self.Convolution = \
167170
nn.ConvTranspose2d(tensor_size[1]//pre_expansion,
168171
out_channels*pst_expansion, filter_size,

0 commit comments

Comments
 (0)