Skip to content
New issue

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

iteration number is fixed to 512 and doesn't change #391

Open
irhallac opened this issue Jan 31, 2023 · 0 comments
Open

iteration number is fixed to 512 and doesn't change #391

irhallac opened this issue Jan 31, 2023 · 0 comments

Comments

@irhallac
Copy link

I am finetuning PSPNet with citycscapes dataset. The number of iterations is always 512. Either using a training dataset folder with 2975 images or folder with 3 images. Also changing batch_size doesn't change "512"

I have crated a mini subset of the training images to check the training pipeline, and I am facing this issue.

pretrained_model = pspnet_101_cityscapes()
new_model = pspnet_101(n_classes=51)
transfer_weights(pretrained_model, new_model) # transfer weights from pre-trained model to your model
print("training starts here: \n")
....
ds = "mini_cityscapes_dataset/" #mini_ds
epochs = 2

train_images =  ds+"images_prepped_train/"
train_annotations = ds+"annotations_prepped_train"
test_images = ds+"images_prepped_test/"
test_annotations = ds+"annotations_prepped_test"

print("train_images:",train_images)

new_model.train(
    train_images =  train_images,
    train_annotations = train_annotations,
    checkpoints_path = checkpoints_path , epochs=epochs, batch_size = 2,
    callbacks=callbacks
)
print("training ENDED : \n")

output:

Copying weights
412it [00:00, 1622.12it/s]
Copied weights of 222 layers and skipped 1 layers
training starts here:

train_images: mini_cityscapes_dataset/images_prepped_train/
Verifying training dataset
100%|███████████████████████████████████████████████████████████████████████████████| 3/3 [00:00<00:00, 15.55it/s]
Dataset verified!
Epoch 1/2
 17/512 [..............................] - ETA: 1:37:18 - loss: 1.4936 - accuracy: 0.6144

And can you please clarify if the n_classes parameter should 51 or 20 for citycscapes dataset. In the paper it is mentioned that this dataset has 19 classes. Do we give the number of different cities as number of classes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant