class_docstr: Base class for your neural network models.
  
  Example usage::
  
      import numpy as np
      from singa import opt
      from singa import tensor
      from singa import device
      from singa import autograd
      from singa import layer
      from singa import model
  
      class MyModel(model.Model):
          def __init__(self):
              super(MyModel, self).__init__()
  
              self.softmax_cross_entropy = layer.SoftMaxCrossEntropy()
              self.conv1 = layer.Conv2d(1, 20, 5, padding=0)
              self.conv2 = layer.Conv2d(20, 50, 5, padding=0)
              self.sgd = opt.SGD(lr=0.01)
  
          def forward(self, x):
              y = self.conv1(x)
              y = self.conv2(y)
              return y
  
          def train_one_batch(self, x, y):
              out = self.forward(x)
              loss = self.softmax_cross_entropy(out, y)
              self.sgd(loss)
              return out, loss
docstr: Set the model in evaluation mode.
  
  Args:
      mode(bool): when mode is True, this model will enter training mode
docstr_tok: ["Set","the","model","in","evaluation","mode",".","Args",":","mode","(","bool",")",":","when","mode","is","True",",","this","model","will","enter","training","mode"]
code: def train(self, mode=True):
      """Set the model in evaluation mode.
  
      Args:
          mode(bool): when mode is True, this model will enter training mode
      """
      self.training = mode
      autograd.training = mode
  
imports: import os
  import gc
  import time
  import json
  import zipfile
  import numpy
  from functools import wraps
  from collections import Iterable
  from singa import tensor
  from singa import autograd
  from singa import layer
  from .tensor import Tensor
  from .None import singa_wrap
label_desc: Use image node_id 5 for calling the Model obj's underlying member method code with example usage: obj.train(mode) without return types