class_docstr: Keras Callback that will update the value of `state.batch` with the current batch number at
  the end of each batch. Batch will reset to 0 at the end of each epoch.
  
  If `steps_per_epoch` is set, then this callback will also ensure that the number of steps
  in the first epoch following a reset is shortened by the number of batches already processed.
class_docstr_tok: ["Keras","Callback","that","will","update","the","value","of","`","state.batch","`","with","the","current","batch","number","at","the","end","of","each","batch",".","Batch","will","reset","to","0","at","the","end","of","each","epoch",".","If","`","steps_per_epoch","`","is","set",",","then","this","callback","will","also","ensure","that","the","number","of","steps","in","the","first","epoch","following","a","reset","is","shortened","by","the","number","of","batches","already","processed","."]
docstr: Constructs a new UpdateBatchStateCallback.
  
  Args:
      state: `horovod.common.elastic.State` object to be updated.
docstr_tok: ["Constructs","a","new","UpdateBatchStateCallback",".","Args",":","state",":","`","horovod.common.elastic.State","`","object","to","be","updated","."]
code: def __init__(self, state):
      """
      Constructs a new UpdateBatchStateCallback.
  
      Args:
          state: `horovod.common.elastic.State` object to be updated.
      """
      super(UpdateBatchStateCallback, self).__init__(
          keras.backend, state
      )
  
file_path: horovod/horovod/keras/elastic.py
imports: import keras
  from horovod._keras import elastic
  from horovod.tensorflow.elastic import TensorFlowKerasState, run
label_desc: Use image node_id 1 to create a new UpdateBatchStateCallback object from inherited base classes: _impl, keras.callbacks with example: obj = UpdateBatchStateCallback(state)