SystemErrorWang / White-box-Cartoonization

Official tensorflow implementation for CVPR2020 paper “Learning to Cartoonize Using White-box Cartoon Representations”
3.93k stars 737 forks source link

Error running training.py #91

Closed Alby-Thomas closed 2 years ago

Alby-Thomas commented 2 years ago

Dear wang, I really appreciate the work you have done.I run pretrain.py and got model in pretrain folder but got an error when i run train.py. The error is like this Traceback (most recent call last): File "train.py", line 206, in train(args)
File "train.py", line 193, in train str(total_iter)+'_face_result.jpg', 4) File "/content/drive/My Drive/cartoon/wbc_100/White-box-Cartoonization/train_code/utils.py", line 160, in write_batch_image image[k] = (image[k]+1) * 127.5 IndexError: index 1 is out of bounds for axis 0 with size 1]

SystemErrorWang commented 2 years ago

it seems the image[k] is empty, maybe you changed batch size? These few lines of code are just saving results during training, you can just comment them and training process can work fine without them.

Alby-Thomas commented 2 years ago

Thanku Wang for your reply. I will try it out and let you know.

Alby-Thomas commented 2 years ago

Yes that happened because I changed the batch size. Now training error changed.