mediapipe_model_maker.model_util.get_steps_per_epoch

Gets the estimated training steps per epoch.

  1. If steps_per_epoch is set, returns steps_per_epoch directly.
  2. Else if we can get the length of training data successfully, returns train_data_length // batch_size.

steps_per_epoch int, training steps per epoch.
batch_size int, batch size.
train_data training data.

Estimated training steps per epoch.

ValueError if both steps_per_epoch and train_data are not set.