Is there an equivalent to iter_size from Caffe in Keras?

Viewed 41

I've been looking for an equivalent of iter_size parameter in Caffe but in Keras.

This is what iter_size means:

iter_size: Accumulate gradients across batches through the iter_size solver field. With this setting batch_size: 16 with iter_size: 1 and batch_size: 4 with iter_size: 4 are equivalent.

I've checked the steps_per_execution parameter in Keras but I'm not sure if it is the same.

steps_per_execution: Defaults to 1. The number of batches to run during each tf.function call. Running multiple batches inside a single tf.function call can greatly improve performance on TPUs or small models with a large Python overhead. At most, one full epoch will be run each execution. If a number larger than the size of the epoch is passed, the execution will be truncated to the size of the epoch. Note that if steps_per_execution is set to N, Callback.on_batch_begin and Callback.on_batch_end methods will only be called every N batches (i.e. before/after each tf.function execution)

Does anybody know if this is the same or if there is another equivalent parameter? I really appreciate your help, thanks!

0 Answers
Related