(self, batch)
return xs, ilens, ys, olens, uttid_list
Transforms a batch
    param: batch, list of (uttid, {'input': [{...}], 'output': [{...}]})
Transforms a batch
    param: batch, list of (uttid, {'input': [{...}], 'output': [{...}]})
Transforms a batch param : batch list of ( uttid { input : [ { ... } ] output : [ { ... } ] } )
def __call__(self, batch):
    ''' Transforms a batch
    param: batch, list of (uttid, {'input': [{...}], 'output': [{...}]})
    '''
    # batch should be located in list
    # list of examples
    (xs, ys), uttid_list = self.transform(batch)  #pylint: disable=invalid-name

    # perform subsampling
    if self.subsampling_factor > 1:
      xs = [x[::self.subsampling_factor, :] for x in xs]  #pylint: disable=invalid-name

    # get batch of lengths of input and output sequences
    ilens = [x.shape[0] for x in xs]
    olens = [y.shape[0] for y in ys]

    return xs, ilens, ys, olens, uttid_list
def __call__ ( self , batch ) : # batch should be located in list # list of examples ( xs , ys ) , uttid_list = self . transform ( batch ) #pylint: disable=invalid-name # perform subsampling if self . subsampling_factor > 1 : xs = [ x [ : : self . subsampling_factor , : ] for x in xs ] #pylint: disable=invalid-name # get batch of lengths of input and output sequences ilens = [ x . shape [ 0 ] for x in xs ] olens = [ y . shape [ 0 ] for y in ys ] return xs , ilens , ys , olens , uttid_list