(self, net, labels_one_hot, model_params, method_params)
Stores argument in member variable for further use.

    Args:
      net: A tensor with shape [batch_size, num_features, feature_size] which
        contains some extracted image features.
      labels_one_hot: An optional (can be None) ground truth labels for the
        input features. Is a tensor with shape
        [batch_size, seq_length, num_char_classes]
      model_params: A namedtuple with model parameters (model.ModelParams).
      method_params: A SequenceLayerParams instance.
Stores argument in member variable for further use.
Stores argument in member variable for further use .
def __init__(self, net, labels_one_hot, model_params, method_params):
    """Stores argument in member variable for further use.

    Args:
      net: A tensor with shape [batch_size, num_features, feature_size] which
        contains some extracted image features.
      labels_one_hot: An optional (can be None) ground truth labels for the
        input features. Is a tensor with shape
        [batch_size, seq_length, num_char_classes]
      model_params: A namedtuple with model parameters (model.ModelParams).
      method_params: A SequenceLayerParams instance.
    """
    self._params = model_params
    self._mparams = method_params
    self._net = net
    self._labels_one_hot = labels_one_hot
    self._batch_size = net.get_shape().dims[0].value

    # Initialize parameters for char logits which will be computed on the fly
    # inside an LSTM decoder.
    self._char_logits = {}
    regularizer = slim.l2_regularizer(self._mparams.weight_decay)
    self._softmax_w = slim.model_variable(
        'softmax_w',
        [self._mparams.num_lstm_units, self._params.num_char_classes],
        initializer=orthogonal_initializer,
        regularizer=regularizer)
    self._softmax_b = slim.model_variable(
        'softmax_b', [self._params.num_char_classes],
        initializer=tf.zeros_initializer(),
        regularizer=regularizer)
def __init__ ( self , net , labels_one_hot , model_params , method_params ) : self . _params = model_params self . _mparams = method_params self . _net = net self . _labels_one_hot = labels_one_hot self . _batch_size = net . get_shape ( ) . dims [ 0 ] . value # Initialize parameters for char logits which will be computed on the fly # inside an LSTM decoder. self . _char_logits = { } regularizer = slim . l2_regularizer ( self . _mparams . weight_decay ) self . _softmax_w = slim . model_variable ( 'softmax_w' , [ self . _mparams . num_lstm_units , self . _params . num_char_classes ] , initializer = orthogonal_initializer , regularizer = regularizer ) self . _softmax_b = slim . model_variable ( 'softmax_b' , [ self . _params . num_char_classes ] , initializer = tf . zeros_initializer ( ) , regularizer = regularizer )