code: def batchify(self, data, bsz):
      # Work out how cleanly we can divide the dataset into bsz parts.
      nbatch = data.size(0) // bsz
      # Trim off any extra elements that wouldn't cleanly fit (remainders).
      data = data.narrow(0, 0, nbatch * bsz)
      # Evenly divide the data across the bsz batches.
      data = data.view(bsz, -1).t().contiguous()
      return to_device(data, self.device)
  
file_path: skorch/examples/word_language_model/data.py
imports: import os
  from skorch.utils import to_device
  import torch
  from torch.autograd import Variable
label_desc: Use image node_id 2 for calling the Loader obj's underlying member method code with example usage: obj.batchify(data, bsz) and returns: to_device