(n_steps_per_example=1, only_shapes=True)
return log
Creates a logging component of the input pipeline.
Creates a logging component of the input pipeline.
Creates a logging component of the input pipeline .
def Log(n_steps_per_example=1, only_shapes=True):  # pylint: disable=invalid-name
  """Creates a logging component of the input pipeline."""
  def log(stream):
    counter = 0
    for example in stream:
      item_to_log = example
      if only_shapes:
        item_to_log = fastmath.nested_map(shapes.signature, example)
      if counter % n_steps_per_example == 0:
        logging.info(str(item_to_log))
        print(item_to_log)
      counter += 1
      yield example
  return log
def Log ( n_steps_per_example = 1 , only_shapes = True ) : # pylint: disable=invalid-name def log ( stream ) : counter = 0 for example in stream : item_to_log = example if only_shapes : item_to_log = fastmath . nested_map ( shapes . signature , example ) if counter % n_steps_per_example == 0 : logging . info ( str ( item_to_log ) ) print ( item_to_log ) counter += 1 yield example return log