# Codeblock 3c def forward(self, x): print(f'original\t\t: {x.size()}') if self.add_channel or self.downsample: #(1) residual = self.bn_proj(self.projection(x)) #(2) print(f'after projection\t: {residual.size()}') else: residual = x #(3) print(f'no projection\t\t: {residual.size()}') x = self.conv0(x) #(4) x = self.bn0(x) x = self.relu(x) print(f'after conv0-bn0-relu\t: {x.size()}') x = self.conv1(x) x = self.bn1(x) x = self.relu(x) print(f'after conv1-bn1-relu\t: {x.size()}') x = self.conv2(x) #(5) x = self.bn2(x) print(f'after conv2-bn2\t\t: {x.size()}') x = x + residual x = self.relu(x) #(6) print(f'after summation\t\t: {x.size()}') return x