We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! I'm trying to train the model on my dataset in notebook #4 with pictures of size 288x288. I have changed image sizes here:
`
train_datagen = AugmentingDataGenerator( rotation_range=10, width_shift_range=0.1, height_shift_range=0.1, rescale=1./255, horizontal_flip=True ) train_generator = train_datagen.flow_from_directory( TRAIN_DIR, MaskGenerator(288, 288, 3), target_size=(288, 288), batch_size=BATCH_SIZE )
val_datagen = AugmentingDataGenerator(rescale=1./255) val_generator = val_datagen.flow_from_directory( VAL_DIR, MaskGenerator(288, 288, 3), target_size=(288, 288), batch_size=20, classes=['val'], seed=42 )
test_datagen = AugmentingDataGenerator(rescale=1./255) test_generator = test_datagen.flow_from_directory( TEST_DIR, MaskGenerator(288, 288, 3), target_size=(288, 288), batch_size=20, seed=42 )`
but receiving the following error:
ValueError: Error when checking input: expected inputs_img to have shape (512, 512, 3) but got array with shape (288, 288, 3)
in cell #44 when starting to train.
Is there a way to train on a different size or only 512x512?
The text was updated successfully, but these errors were encountered:
I have the same probelm here. Did you find any solution?
Sorry, something went wrong.
Yes, you also need to change size in the file pconv_model.py in line 21.
No branches or pull requests
Hi! I'm trying to train the model on my dataset in notebook #4 with pictures of size 288x288. I have changed image sizes here:
`
Create training generator
train_datagen = AugmentingDataGenerator(
rotation_range=10,
width_shift_range=0.1,
height_shift_range=0.1,
rescale=1./255,
horizontal_flip=True
)
train_generator = train_datagen.flow_from_directory(
TRAIN_DIR,
MaskGenerator(288, 288, 3),
target_size=(288, 288),
batch_size=BATCH_SIZE
)
Create validation generator
val_datagen = AugmentingDataGenerator(rescale=1./255)
val_generator = val_datagen.flow_from_directory(
VAL_DIR,
MaskGenerator(288, 288, 3),
target_size=(288, 288),
batch_size=20,
classes=['val'],
seed=42
)
Create testing generator
test_datagen = AugmentingDataGenerator(rescale=1./255)
test_generator = test_datagen.flow_from_directory(
TEST_DIR,
MaskGenerator(288, 288, 3),
target_size=(288, 288),
batch_size=20,
seed=42
)`
but receiving the following error:
ValueError: Error when checking input: expected inputs_img to have shape (512, 512, 3) but got array with shape (288, 288, 3)
in cell #44 when starting to train.
Is there a way to train on a different size or only 512x512?
The text was updated successfully, but these errors were encountered: