class_docstr: A Batch of training/evaluation data.
class_docstr_tok: ["A","Batch","of","training\/evaluation","data","."]
docstr: Initialize a Batch instance.
  
  Args:
    **kwargs: data dictionary. Must have three keys "pianorolls", "masks",
        "lengths", each corresponding to a model placeholder. Each value
        is a sequence (i.e. a batch) of examples.
docstr_tok: ["Initialize","a","Batch","instance",".","Args",":","*","*","kwargs",":","data","dictionary",".","Must","have","three","keys","``","pianorolls","''",",","``","masks","''",",","``","lengths","''",",","each","corresponding","to","a","model","placeholder",".","Each","value","is","a","sequence","(","i.e",".","a","batch",")","of","examples","."]
code: def __init__(self, **kwargs):
      """Initialize a Batch instance.
  
      Args:
        **kwargs: data dictionary. Must have three keys "pianorolls", "masks",
            "lengths", each corresponding to a model placeholder. Each value
            is a sequence (i.e. a batch) of examples.
      """
      assert set(kwargs.keys()) == self.keys
      assert all(
          len(value) == len(list(kwargs.values())[0])
          for value in kwargs.values()
      )
      self.features = kwargs
  
imports: import os
  from magenta.models.coconet import lib_mask
  from magenta.models.coconet import lib_pianoroll
  from magenta.models.coconet import lib_util
  import numpy
  import tensorflow.compat.v1
label_desc: Use image node_id 1 to create a new Batch object from inherited base classes: object with example: obj = Batch()