class_docstr: SparseDense is the sparse version of layer Dense. SparseDense has two different from Dense:
  firstly, SparseDense's input Tensor is a SparseTensor. Secondly, SparseDense doesn't backward
  gradient to next layer in the backpropagation by default, as the gradInput of SparseDense is
  useless and very big in most cases.
  
  But, considering model like Wide&Deep, we provide backwardStart and backwardLength to backward
  part of the gradient to next layer.
  
  The most common input is 2D.
  
  When you use this layer as the first layer of a model, you need to provide the argument
  inputShape (a Single Shape, does not include the batch dimension).
  
  # Arguments
  output_dim: The size of output dimension.
  init: String representation of the initialization method for the weights of the layer.
        Default is 'glorot_uniform'.
  activation: String representation of the activation function to use
              (such as 'relu' or 'sigmoid'). Default is None.
  W_regularizer: An instance of [[Regularizer]], (eg. L1 or L2 regularization),
                 applied to the input weights matrices. Default is None.
  b_regularizer: An instance of [[Regularizer]], applied to the bias. Default is None.
  bias: Whether to include a bias (i.e. make the layer affine rather than linear).
        Default is True.
  backward_start: backward start index, counting from 1.
  backward_length: backward length.
  input_shape: A shape tuple, not including batch.
  name: String to set the name of the layer.
        If not specified, its name will by default to be a generated string.
  
  >>> sparseDense = SparseDense(10, input_shape=(10, 4), name="sparseDense")
  creating: createZooKerasSparseDense
class_docstr_tok: ["SparseDense","is","the","sparse","version","of","layer","Dense",".","SparseDense","has","two","different","from","Dense",":","firstly",",","SparseDense","'s","input","Tensor","is","a","SparseTensor",".","Secondly",",","SparseDense","does","n't","backward","gradient","to","next","layer","in","the","backpropagation","by","default",",","as","the","gradInput","of","SparseDense","is","useless","and","very","big","in","most","cases",".","But",",","considering","model","like","Wide","&","Deep",",","we","provide","backwardStart","and","backwardLength","to","backward","part","of","the","gradient","to","next","layer",".","The","most","common","input","is","2D",".","When","you","use","this","layer","as","the","first","layer","of","a","model",",","you","need","to","provide","the","argument","inputShape","(","a","Single","Shape",",","does","not","include","the","batch","dimension",")",".","#","Arguments","output_dim",":","The","size","of","output","dimension",".","init",":","String","representation","of","the","initialization","method","for","the","weights","of","the","layer",".","Default","is","'glorot_uniform","'",".","activation",":","String","representation","of","the","activation","function","to","use","(","such","as","'relu","'","or","'sigmoid","'",")",".","Default","is","None",".","W_regularizer",":","An","instance","of","[","[","Regularizer","]","]",",","(","eg",".","L1","or","L2","regularization",")",",","applied","to","the","input","weights","matrices",".","Default","is","None",".","b_regularizer",":","An","instance","of","[","[","Regularizer","]","]",",","applied","to","the","bias",".","Default","is","None",".","bias",":","Whether","to","include","a","bias","(","i.e",".","make","the","layer","affine","rather","than","linear",")",".","Default","is","True",".","backward_start",":","backward","start","index",",","counting","from","1.","backward_length",":","backward","length",".","input_shape",":","A","shape","tuple",",","not","including","batch",".","name",":","String","to","set","the","name","of","the","layer",".","If","not","specified",",","its","name","will","by","default","to","be","a","generated","string",".",">",">",">","sparseDense","=","SparseDense","(","10",",","input_shape=","(","10",",","4",")",",","name=","''","sparseDense","''",")","creating",":","createZooKerasSparseDense"]
code: def __init__(
      self,
      output_dim,
      init="glorot_uniform",
      activation=None,
      W_regularizer=None,
      b_regularizer=None,
      backward_start=-1,
      backward_length=-1,
      init_weight=None,
      init_bias=None,
      init_grad_weight=None,
      init_grad_bias=None,
      bias=True,
      input_shape=None,
      **kwargs,
  ):
      super(SparseDense, self).__init__(
          None,
          output_dim,
          init,
          activation,
          W_regularizer,
          b_regularizer,
          backward_start,
          backward_length,
          init_weight,
          init_bias,
          init_grad_weight,
          init_grad_bias,
          bias,
          list(input_shape) if input_shape else None,
          **kwargs,
      )
  
imports: import sys
  from bigdl.util.common import INTMIN
  from ..engine.topology import ZooKerasLayer
label_desc: Use image node_id 1 to create a new SparseDense object from inherited base classes: ZooKerasLayer with example: obj = SparseDense(output_dim, init, activation, W_regularizer, b_regularizer, backward_start, backward_length, init_weight, init_bias, init_grad_weight, init_grad_bias, bias, input_shape)