HCIILAB/SCUT-FBP5500-Database-Release

dimension mismatch in forward.py

ygrayson opened this issue · 1 comments

Hi,

Here's a problem that I run into while running the python script in trained_models/forward.py. Since my input pictures are gray, I changed the variable isColor as following:

inputs = load_img(imgdir, resize = (256, 256), isColor = False, crop_size = batch_shape[3], crop_type = 'center_crop', raw_scale = 255, means = means)

Then while running the code, I encounter the error:

File "forward.py", line 85, in load_img img -= means ValueError: non-broadcastable output operand with shape (1,224,224) doesn't match the broadcast shape (3,224,224)

It looks like the size of means and the size of img doesn't match. How should I change the code correspondingly?

Thanks in advance.