Sure. Thanks for quick reply. My input shape is (2048, 1, 2) -> H,W,C format.
And this is how I create instance of Generator in init method of the other class:
        self.file_shape = (2048, 1, 2)
        self.generator = Generator(self.file_shape).to(memory_format=torch.channels_last)

And this is usage in my training loop, where real_B is tensor of shape (100, 2048,1,2) -> BHWC format:
 fake_A = self.generator(real_B.to(memory_format=torch.channels_last))

And the error message is RuntimeError: Given groups=1, weight of size [8, 2, 4, 1], expected input[100, 2048, 1, 2] to have 2 channels, but got 2048 channels instead