You can use a linear layer instead of a convolutional layer if you want to stick with 2-D tensors… Or you can prevent flattening your images and convert your data into tensor shapes compatible for convolution.
I can point you towards C-GAN implementation to help you understand better