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: Defines the computation performed in every forward propagation.
  
  Should be overridden by all subclasses.
  
  Args:
      *input: the input training data for the model
  
  Returns:
      out: the outputs of the forward propagation.
docstr_tok: ["Defines","the","computation","performed","in","every","forward","propagation",".","Should","be","overridden","by","all","subclasses",".","Args",":","*","input",":","the","input","training","data","for","the","model","Returns",":","out",":","the","outputs","of","the","forward","propagation","."]
code: def forward(self, *input):
      """Defines the computation performed in every forward propagation.
  
      Should be overridden by all subclasses.
  
      Args:
          *input: the input training data for the model
  
      Returns:
          out: the outputs of the forward propagation.
      """
      raise NotImplementedError
  
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 3 for calling the Model obj's underlying member method code with example usage: obj.forward() without return types