class_docstr: Custom Converter.
  
  Args:
      subsampling_factor (int): The subsampling factor.
class_docstr_tok: ["Custom","Converter",".","Args",":","subsampling_factor","(","int",")",":","The","subsampling","factor","."]
docstr: Perform sabsampling.
  
  Args:
      batch (list): Batch that will be sabsampled.
      device (device): GPU device.
  
  Returns:
      chainer.Variable: xp.array that sabsampled from batch.
      xp.array: xp.array of the length of the mini-batches.
      chainer.Variable: xp.array that sabsampled from batch.
docstr_tok: ["Perform","sabsampling",".","Args",":","batch","(","list",")",":","Batch","that","will","be","sabsampled",".","device","(","device",")",":","GPU","device",".","Returns",":","chainer.Variable",":","xp.array","that","sabsampled","from","batch",".","xp.array",":","xp.array","of","the","length","of","the","mini-batches",".","chainer.Variable",":","xp.array","that","sabsampled","from","batch","."]
code: def __call__(self, batch, device):
      """Perform sabsampling.
  
      Args:
          batch (list): Batch that will be sabsampled.
          device (device): GPU device.
  
      Returns:
          chainer.Variable: xp.array that sabsampled from batch.
          xp.array: xp.array of the length of the mini-batches.
          chainer.Variable: xp.array that sabsampled from batch.
  
      """
      # set device
      xp = cuda.cupy if device != -1 else np
  
      # batch should be located in list
      assert len(batch) == 1
      xs, ys = batch[0]
  
      # perform subsampling
      if self.subsampling_factor > 1:
          xs = [x[:: self.subsampling_factor, :] for x in xs]
  
      # get batch made of lengths of input sequences
      ilens = [x.shape[0] for x in xs]
  
      # convert to Variable
      xs = [Variable(xp.array(x, dtype=xp.float32)) for x in xs]
      ilens = xp.array(ilens, dtype=xp.int32)
      ys = [Variable(xp.array(y, dtype=xp.int32)) for y in ys]
  
      return xs, ilens, ys
  
imports: import collections
  import logging
  import math
  import numpy
  from chainer import Variable, cuda, training
  from chainer.training.updaters.multiprocess_parallel_updater import gather_grads, gather_params, scatter_grads
label_desc: Use image node_id 2 for calling the CustomConverter obj's underlying member method code with example usage: obj.__call__(batch, device) and returns: xs,  ilens,  ys