(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.
Initialize a Batch instance.
Initialize a Batch instance .
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
def __init__ ( self , * * kwargs ) : assert set ( kwargs . keys ( ) ) == self . keys assert all ( len ( value ) == len ( list ( kwargs . values ( ) ) [ 0 ] ) for value in kwargs . values ( ) ) self . features = kwargs