thangtran480/hair-segmentation

ValueError: zero-size array to reduction operation maximum which has no identity

lbininhbl opened this issue · 2 comments

Hi @thangtran480
Every time I ran python train.py, I jus get the error "ValueError: zero-size array to reduction operation maximum which has no identity".

iShot2020-11-27 16 07 07

Train all CelebAMask-HQ photos takes several hours, so I reduced the number of images to identify something wrong, but nothing.

I made data struture like this:
image
image

Are there any more steps I need to take?

Did you debug your number of images, mask after load data from dir.

This error occurs when your image is empty.

Maybe your number of samples is small than BATCH_SIZE, which default is 32. You can try BATCH_SIZE = 2