24c14ca346506f31d789db35bb1b0173b7d97ce6,magenta/music/encoder_decoder_test.py,OneHotEventSequenceEncoderDecoderTest,testEncode,#OneHotEventSequenceEncoderDecoderTest#,61

Before Change


                       [1.0, 0.0, 0.0],
                       [0.0, 0.0, 1.0]]
    expected_labels = [1, 0, 2, 0]
    expected_sequence_example = encoder_decoder.make_sequence_example(
        expected_inputs, expected_labels)
    self.assertEqual(sequence_example, expected_sequence_example)

  def testGetInputsBatch(self):
    event_sequences = [[0, 1, 0, 2, 0], [0, 1, 2]]

After Change



  def testEncode(self):
    events = [0, 1, 0, 2, 0]
    inputs, labels = self.enc.encode(events)
    expected_inputs = [[1.0, 0.0, 0.0],
                       [0.0, 1.0, 0.0],
                       [1.0, 0.0, 0.0],
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: tensorflow/magenta
Commit Name: 24c14ca346506f31d789db35bb1b0173b7d97ce6
Time: 2020-06-09
Author: adarob@google.com
File Name: magenta/music/encoder_decoder_test.py
Class Name: OneHotEventSequenceEncoderDecoderTest
Method Name: testEncode


Project Name: tensorflow/magenta
Commit Name: 24c14ca346506f31d789db35bb1b0173b7d97ce6
Time: 2020-06-09
Author: adarob@google.com
File Name: magenta/music/encoder_decoder_test.py
Class Name: OneHotIndexEventSequenceEncoderDecoderTest
Method Name: testEncode


Project Name: tensorflow/magenta
Commit Name: 24c14ca346506f31d789db35bb1b0173b7d97ce6
Time: 2020-06-09
Author: adarob@google.com
File Name: magenta/music/encoder_decoder_test.py
Class Name: ConditionalEventSequenceEncoderDecoderTest
Method Name: testEncode


Project Name: tensorflow/magenta
Commit Name: 24c14ca346506f31d789db35bb1b0173b7d97ce6
Time: 2020-06-09
Author: adarob@google.com
File Name: magenta/music/melody_encoder_decoder_test.py
Class Name: MelodyOneHotEventSequenceEncoderDecoderTest
Method Name: testEncode