I think in the functional.py it is calling the batch_norm() which is giving the error.
File “/anaconda3/envs/cyclegan/lib/python3.6/site-packages/torch/nn/functional.py”, line 1293, in _instance_norm
training=use_input_stats, momentum=momentum, eps=eps)
File “/anaconda3/envs/cyclegan/lib/python3.6/site-packages/torch/nn/functional.py”, line 1251, in batch_norm
raise ValueError(‘Expected more than 1 value per channel when training, got input size {}’.format(size))
ValueError: Expected more than 1 value per channel when training, got input size [1, 512, 1, 1]