Skip to content

Commit 751d55d

Browse files
committed
Minor fix
1 parent 148983d commit 751d55d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/layers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def forward(self, x, train_flg=True):
136136
self.input_shape = x.shape
137137
if x.ndim != 2:
138138
N, C, H, W = x.shape
139-
x = x.transpose(1, 0, 2, 3).reshape(C, -1)
139+
x = x.reshape(N, -1)
140140

141141
out = self.__forward(x, train_flg)
142142

@@ -171,7 +171,7 @@ def __forward(self, x, train_flg):
171171
def backward(self, dout):
172172
if dout.ndim != 2:
173173
N, C, H, W = dout.shape
174-
dout = dout.transpose(1, 0, 2, 3).reshape(C, -1)
174+
dout = dout.reshape(N, -1)
175175

176176
dx = self.__backward(dout)
177177

0 commit comments

Comments
 (0)