def __init__(self, hidden_size, input_type="sequence", output_type="sequence",
                 inner_activation="sigmoid", outer_activation="tanh",
                 inner_init=None, outer_init=None, steps=None,
                 go_backwards=False,
                 persistent_state=False, batch_size=0,
                 reset_state_for_input=None, forget_bias=1,
                 mask=None,
                 second_input=None, second_input_size=None):
        super(LSTM, self).__init__("lstm")
        self._hidden_size = hidden_size
        self._input_type = input_type
        self._output_type = output_type
        self._inner_activation = inner_activation
        self._outer_activation = outer_activation
        self._inner_init = inner_init
        self._outer_init = outer_init
        self._steps = steps
        self.persistent_state = persistent_state
        self.reset_state_for_input = reset_state_for_input
        self.batch_size = batch_size
        self.go_backwards = go_backwards
        # mask
        mask = mask.tensor if type(mask) == NeuralVariable else mask
        self.mask = mask.dimshuffle((1,0)) if mask else None
        self._sequence_map = OrderedDict()
        # second input
        if type(second_input) == NeuralVariable:
            second_input_size = second_input.dim()
            second_input = second_input.tensor

        self.second_input = second_input
        self.second_input_size = second_input_size
        self.forget_bias = forget_bias
        if input_type not in INPUT_TYPES:
            raise Exception("Input type of LSTM is wrong: %s" % input_type)
        if output_type not in OUTPUT_TYPES:
            raise Exception("Output type of LSTM is wrong: %s" % output_type)
        if self.persistent_state and not self.batch_size:
            raise Exception("Batch size must be set for persistent state mode")
        if mask and input_type == "one":
            raise Exception("Mask only works with sequence input")
dataset/ETHPy150Open zomux/deepy/deepy/layers/lstm.py/LSTM.__init__/original