coralnet / pyspacer

Python based tools for spatial image analysis
MIT License
6 stars 2 forks source link

Training mini-batch size is bespoke to CoralNet instance specs #59

Closed StephenChan closed 6 months ago

StephenChan commented 9 months ago

As seen in train_utils.py's train() function (link), the mini-batch size (and reference-set size cap) is determined as follows:

# Calculate max nbr images to keep in memory (for 5000 samples total).
max_imgs_in_memory = 5000 // labels.samples_per_image

Better to base this on a customizable number instead of a hardcoded 5000.

StephenChan commented 6 months ago

Done in PR #71. Now controlled by the config var TRAINING_BATCH_LABEL_COUNT.