switchablenorms / CelebAMask-HQ

A large-scale face dataset for face parsing, recognition, generation and editing.
2.05k stars 343 forks source link

AssertionError: size of input tensor and input format are different. #13

Closed xianyubai closed 4 years ago

xianyubai commented 4 years ago

Hi! when i run the trainer.py,i got an error: Traceback (most recent call last): File "/home/data/penny/CelebAMask-HQ-master/face_parsing/main.py", line 27, in main(config) File "/home/data/penny/CelebAMask-HQ-master/face_parsing/main.py", line 19, in main trainer.train() File "/home/data/penny/CelebAMask-HQ-master/face_parsing/trainer.py", line 120, in train writer.add_image('imresult/img', (imgs.data + 1) / 2.0, step) File "/usr/local/lib/python3.5/dist-packages/tensorboardX/writer.py", line 548, in add_image image(tag, img_tensor, dataformats=dataformats), global_step, walltime) File "/usr/local/lib/python3.5/dist-packages/tensorboardX/summary.py", line 211, in image tensor = convert_to_HWC(tensor, dataformats) File "/usr/local/lib/python3.5/dist-packages/tensorboardX/utils.py", line 103, in convert_to_HWC tensor shape: {}, input_format: {}".format(tensor.shape, input_format) AssertionError: size of input tensor and input format are different. tensor shape: (8, 3, 512, 512), input_format: CHW I tried to reduce the tensorboardX's version,but it didn't work. So could you tell me how to solve this problem?thank you very much!

steven413d commented 4 years ago

Please install the newest tensorboardX and clone again. We have made a little modification on the problem.

WangZhen1175701153 commented 3 years ago

Please install the newest tensorboardX and clone again. We have made a little modification on the problem.

Are you sure? I think it's maybe wrong with your tensor shape?