class_docstr: A Pipeline that quantizes NoteSequence data.
class_docstr_tok: ["A","Pipeline","that","quantizes","NoteSequence","data","."]
docstr: Creates a Quantizer pipeline.
  
  Exactly one of `steps_per_quarter` and `steps_per_second` should be defined.
  
  Args:
    steps_per_quarter: Steps per quarter note to use for quantization.
    steps_per_second: Steps per second to use for quantization.
    name: Pipeline name.
  
  Raises:
    ValueError: If both or neither of `steps_per_quarter` and
        `steps_per_second` are set.
docstr_tok: ["Creates","a","Quantizer","pipeline",".","Exactly","one","of","`","steps_per_quarter","`","and","`","steps_per_second","`","should","be","defined",".","Args",":","steps_per_quarter",":","Steps","per","quarter","note","to","use","for","quantization",".","steps_per_second",":","Steps","per","second","to","use","for","quantization",".","name",":","Pipeline","name",".","Raises",":","ValueError",":","If","both","or","neither","of","`","steps_per_quarter","`","and","`","steps_per_second","`","are","set","."]
code: def __init__(
      self, steps_per_quarter=None, steps_per_second=None, name=None
  ):
      """Creates a Quantizer pipeline.
  
      Exactly one of `steps_per_quarter` and `steps_per_second` should be defined.
  
      Args:
        steps_per_quarter: Steps per quarter note to use for quantization.
        steps_per_second: Steps per second to use for quantization.
        name: Pipeline name.
  
      Raises:
        ValueError: If both or neither of `steps_per_quarter` and
            `steps_per_second` are set.
      """
      super(Quantizer, self).__init__(name=name)
      if (steps_per_quarter is not None) == (
          steps_per_second is not None
      ):
          raise ValueError(
              "Exactly one of steps_per_quarter or steps_per_second must be set."
          )
      self._steps_per_quarter = steps_per_quarter
      self._steps_per_second = steps_per_second
  
imports: import copy
  from magenta.pipelines import pipeline
  from magenta.pipelines import statistics
  from note_seq import constants
  from note_seq import sequences_lib
  from note_seq.protobuf import music_pb2
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new Quantizer object from inherited base classes: NoteSequencePipeline with example: obj = Quantizer(steps_per_quarter, steps_per_second, name)