(self, note_sequence_scalar)
return augmented_note_sequence_scalar
TF op that augments the NoteSequence.
TF op that augments the NoteSequence.
TF op that augments the NoteSequence .
def tf_augment(self, note_sequence_scalar):
    """TF op that augments the NoteSequence."""
    def _augment_str(note_sequence_str):
      note_sequence = note_seq.NoteSequence.FromString(
          note_sequence_str.numpy())
      augmented_ns = self.augment(note_sequence)
      return [augmented_ns.SerializeToString()]

    augmented_note_sequence_scalar = tf.py_function(
        _augment_str,
        inp=[note_sequence_scalar],
        Tout=tf.string,
        name='augment')
    augmented_note_sequence_scalar.set_shape(())
    return augmented_note_sequence_scalar
def tf_augment ( self , note_sequence_scalar ) : def _augment_str ( note_sequence_str ) : note_sequence = note_seq . NoteSequence . FromString ( note_sequence_str . numpy ( ) ) augmented_ns = self . augment ( note_sequence ) return [ augmented_ns . SerializeToString ( ) ] augmented_note_sequence_scalar = tf . py_function ( _augment_str , inp = [ note_sequence_scalar ] , Tout = tf . string , name = 'augment' ) augmented_note_sequence_scalar . set_shape ( ( ) ) return augmented_note_sequence_scalar