class_docstr: Criterion data parallelism
  
  Parameters
  ----------
  module : object
      Network to be parallelized.
  ctx : list
      A list of contexts to use.
  
  
  Inputs:
  
      - **inputs**: list of inputs (NDArrays)
      - **targets**: list of labels (NDArrays)
  
  Outputs:
  
      - **outputs**: list of output (NDArrays)
  
  Example::
  
      >>> ctx = [mx.gpu(0), mx.gpu(1)]
      >>> net = DataParallelModel(model, ctx=ctx)
      >>> criterion = DataParallelCriterion(criterion)
      >>> y = net(x)
      >>> losses = criterion(y, t)
class_docstr_tok: ["Criterion","data","parallelism","Parameters","--","--","--","--","--","module",":","object","Network","to","be","parallelized",".","ctx",":","list","A","list","of","contexts","to","use",".","Inputs",":","-","*","*","inputs","*","*",":","list","of","inputs","(","NDArrays",")","-","*","*","targets","*","*",":","list","of","labels","(","NDArrays",")","Outputs",":","-","*","*","outputs","*","*",":","list","of","output","(","NDArrays",")","Example",":",":",">",">",">","ctx","=","[","mx.gpu","(","0",")",",","mx.gpu","(","1",")","]",">",">",">","net","=","DataParallelModel","(","model",",","ctx=ctx",")",">",">",">","criterion","=","DataParallelCriterion","(","criterion",")",">",">",">","y","=","net","(","x",")",">",">",">","losses","=","criterion","(","y",",","t",")"]
code: def __init__(self, module, ctx_list=None, sync=False):
      self.module = module
      self.ctx_list = ctx_list
      self.sync = sync
  
imports: import threading
  from mxnet import autograd
  from mxnet.gluon.utils import split_and_load
  from mxnet.ndarray import NDArray
label_desc: Use image node_id 1 to create a new DataParallelCriterion object from inherited base classes: object with example: obj = DataParallelCriterion(module, ctx_list, sync)