0
votes

I am following Matterport Mask RCNN model but I have a doubt regarding setting Steps_per_epoch and Validation_steps for training. I am trying to train a custom dataset. I have 2500 training samples,1500 validation samples and 1000 test samples. If I set the value Steps_per_epoch=1000 and Validation_steps=100 then how many training samples and validation samples are used during one epoch?

2

2 Answers

0
votes

Please look at https://keras.rstudio.com/reference/fit_generator.html in regard to questions about fit_generator.

Step per epochs overrides the length of an epoch to be X batches.

Validation_steps only matter if your validation_data is a generator, it will validate x batches. Else it should use all the validation data provided.

0
votes

STEPS_PER_EPOCH should be the number of instances (training examples) divided by (GPU_COUNT*IMAGES_PER_GPU),

For small enough images and given a single GPU, if you can fit 8in its memory then:

STEPS_PER_EPOCH = 2500/8 # 312
VALIDATION_STEPS = 1500/8 # 187

Keep in mind that the more steps the slower it gets You may overwrite these with your own choices to accelerate matters. Usually one sets

STEPS_PER_EPOCH = 100
VALIDATION_STEPS = 50