Skip to content

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

@irhallac

Description

@irhallac

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions