y = down_outs[self.depth - i]
skip_module = self.skip_seq[self.depth - i]
y = skip_module(y, training=training)
if (y is not None) and (self.merge_type == "add"):
x = x + y
if i != len(down_outs) - 1:
if (i == 0) and self.extra_skip:
skip_module = self.skip_seq[self.depth]
x = skip_module(x, training=training)
After Change
y = down_outs[self.depth - i]
skip_module = self.skip_seq[self.depth - i]
y = skip_module(y, training=training)
x = self._merge(x, y)
if i != len(down_outs) - 1:
if (i == 0) and self.extra_skip:
skip_module = self.skip_seq[self.depth]
x = skip_module(x, training=training)