根据 TF 2 中的文档:
steps_per_epoch: Integer or `None`.
Total number of steps (batches of samples)
before declaring one epoch finished and starting the
next epoch. When training with input tensors such as
TensorFlow data tensors, the default `None` is equal to
the number of samples in your dataset divided by
the batch size, or 1 if that cannot be determined. If x is a
`tf.data` dataset, and 'steps_per_epoch'
is None, the epoch will run until the input dataset is exhausted.
This argument is not supported with array inputs.
validation_steps: Only relevant if `validation_data` is provided and
is a `tf.data` dataset. Total number of steps (batches of
samples) to draw before stopping when performing validation
at the end of every epoch. If validation_data is a `tf.data` dataset
and 'validation_steps' is None, validation
will run until the `validation_data` dataset is exhausted.
我不明白这部分:
Total number of steps (batches of samples)
before declaring one epoch finished and starting the
next epoch.
如果我有 1000 个样本,批量大小 = 100,那么一个 epoch 将需要 10 个步骤才能达到。为什么需要另一个steps_per_epoch?如果两者都使用,则它们是冲突的。不是吗?如果批量大小为 100,则需要 10 个步骤。如果steps_per_epoch = 20,则意味着一个epoch需要20个批次,这与通过批次大小参数100计算的“10”步相冲突。
我哪里错了?