Hi Hmrishav, I have just double-checked my settings and size of input image, for your reference:
Settings:
PyTorch version: 1.1.0
CUDA version: 9.0.176

         Args         |    Type    |    Value
  cuda                |  bool      |  True
  train               |  bool      |  True
  resume              |  bool      |  False
  data_dir            |  str       |  ../datasets
  out_dir             |  str       |  output
  epochs              |  int       |  800
  batch_size          |  int       |  32
  lr                  |  float     |  0.0002
  latent_dim          |  int       |  62
  classes             |  int       |  25
  img_size            |  int       |  128
  channels            |  int       |  3

Image size as input:
torch.Size([32, 3, 128, 128])

In fact, I actually replaced the in-between linear layers in the original model to convolutional layers for experiment on purpose, as the training performance was not quite ideal on my dataset with pure linear layers.
I would like to know if I wanna stick on using convolutional layers in-between, what adjustment should I make on my current settings. Like you mentioned, I can “prevent flattening your images and convert your data into tensor shapes compatible for convolution”, what specifically should I change on my code?
Again, thank you!