parameters: ()
return_statement: return mx.symbol.LogisticRegressionOutput(data=fc1, name='softmax')
docstring: A lenet style net, takes difference of each frame as input.
docstring_summary: A lenet style net, takes difference of each frame as input.
docstring_tokens: A lenet style net takes difference of each frame as input .
function: def get_lenet():
      """ A lenet style net, takes difference of each frame as input.
      """
      source = mx.sym.Variable("data")
      source = (source - 128) * (1.0/128)
      frames = mx.sym.SliceChannel(source, num_outputs=30)
      diffs = [frames[i+1] - frames[i] for i in range(29)]
      source = mx.sym.Concat(*diffs)
      net = mx.sym.Convolution(source, kernel=(5, 5), num_filter=40)
      net = mx.sym.BatchNorm(net, fix_gamma=True)
      net = mx.sym.Activation(net, act_type="relu")
      net = mx.sym.Pooling(net, pool_type="max", kernel=(2,2), stride=(2,2))
      net = mx.sym.Convolution(net, kernel=(3, 3), num_filter=40)
      net = mx.sym.BatchNorm(net, fix_gamma=True)
      net = mx.sym.Activation(net, act_type="relu")
      net = mx.sym.Pooling(net, pool_type="max", kernel=(2,2), stride=(2,2))
      # first fullc
      flatten = mx.symbol.Flatten(net)
      flatten = mx.symbol.Dropout(flatten)
      fc1 = mx.symbol.FullyConnected(data=flatten, num_hidden=600)
      # Name the final layer as softmax so it auto matches the naming of data iterator
      # Otherwise we can also change the provide_data in the data iter
      return mx.symbol.LogisticRegressionOutput(data=fc1, name='softmax')
function_tokens: def get_lenet ( ) : source = mx . sym . Variable ( "data" ) source = ( source - 128 ) * ( 1.0 / 128 ) frames = mx . sym . SliceChannel ( source , num_outputs = 30 ) diffs = [ frames [ i + 1 ] - frames [ i ] for i in range ( 29 ) ] source = mx . sym . Concat ( * diffs ) net = mx . sym . Convolution ( source , kernel = ( 5 , 5 ) , num_filter = 40 ) net = mx . sym . BatchNorm ( net , fix_gamma = True ) net = mx . sym . Activation ( net , act_type = "relu" ) net = mx . sym . Pooling ( net , pool_type = "max" , kernel = ( 2 , 2 ) , stride = ( 2 , 2 ) ) net = mx . sym . Convolution ( net , kernel = ( 3 , 3 ) , num_filter = 40 ) net = mx . sym . BatchNorm ( net , fix_gamma = True ) net = mx . sym . Activation ( net , act_type = "relu" ) net = mx . sym . Pooling ( net , pool_type = "max" , kernel = ( 2 , 2 ) , stride = ( 2 , 2 ) ) # first fullc flatten = mx . symbol . Flatten ( net ) flatten = mx . symbol . Dropout ( flatten ) fc1 = mx . symbol . FullyConnected ( data = flatten , num_hidden = 600 ) # Name the final layer as softmax so it auto matches the naming of data iterator # Otherwise we can also change the provide_data in the data iter return mx . symbol . LogisticRegressionOutput ( data = fc1 , name = 'softmax' )