You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
when i run this command python train_full.py \ --img_file=/path/to/images.npy \ --mask_file=/path/to/masks.npy
i got this error:
Traceback (most recent call last): File "train_full.py", line 96, in <module> train(**vars(args)) File "train_full.py", line 21, in train train_gen, validation_gen, img_shape = load_data(img_file, mask_file) File "/home/lafi/Desktop/HairSegmentation/mobile-semantic-segmentation-master/data.py", line 60, in load_data train_img_gen.fit(images) File "/usr/local/lib/python2.7/dist-packages/keras/preprocessing/image.py", line 675, in fit 'Got array with shape: ' + str(x.shape)) ValueError: Input to .fit()should have rank 4. Got array with shape: (0,)
Please how i can fix it
Thank you
Lafi
The text was updated successfully, but these errors were encountered:
I accidentally had all the images in a folder called "raw" and the masks in a separate folder called "masks". The "images" and "masks" folders must go inside the "raw" folder.
when i run this command
python train_full.py \ --img_file=/path/to/images.npy \ --mask_file=/path/to/masks.npy
i got this error:
Traceback (most recent call last): File "train_full.py", line 96, in <module> train(**vars(args)) File "train_full.py", line 21, in train train_gen, validation_gen, img_shape = load_data(img_file, mask_file) File "/home/lafi/Desktop/HairSegmentation/mobile-semantic-segmentation-master/data.py", line 60, in load_data train_img_gen.fit(images) File "/usr/local/lib/python2.7/dist-packages/keras/preprocessing/image.py", line 675, in fit 'Got array with shape: ' + str(x.shape)) ValueError: Input to
.fit()should have rank 4. Got array with shape: (0,)
Please how i can fix it
Thank you
Lafi
The text was updated successfully, but these errors were encountered: