# Codeblock 10b def split_channels(self, x): channel_count = x.size(1) if channel_count%2 != 0: split_size_2 = channel_count // 2 #(1) split_size_1 = channel_count - split_size_2 #(2) return torch.split(x, [split_size_1, split_size_2], dim=1) #(3) else: return torch.split(x, channel_count // 2, dim=1) #(4)