for i, link in enumerate(self):
h = link(h)
if i in {33, 39, 45}:
yield h
elif i in {14, 23}:
hs.append(h)
elif i in {34, 40}:
h = F.concat((_upsample(h), hs.pop()))
After Change
self.append(Conv2DBNActiv(n, 1, activ=_leaky_relu))
def __call__(self, x):
ys = []
h = x
hs = []
for i, link in enumerate(self):
h = link(h)
if i in {33, 39, 45}:
ys.append(h)
elif i in {14, 23}:
hs.append(h)
elif i in {34, 40}:
h = F.concat((_upsample(h), hs.pop()))