deepy/layers/recurrent.py
def get_step_inputs(self, input_var, states=None, mask=None, additional_inputs=None):
        """
        :type input_var: T.var
        :rtype: dict
        """
        step_inputs = {}
        if self._input_type == "sequence":
            if not additional_inputs:
                additional_inputs = []
            if mask:
                step_inputs['mask'] = mask.dimshuffle(1, 0)
            step_inputs.update(self.merge_inputs(input_var, additional_inputs=additional_inputs))
        else:
            # step_inputs["mask"] = mask.dimshuffle((1,0)) if mask else None
            if additional_inputs:
                step_inputs.update(self.merge_inputs(None, additional_inputs=additional_inputs))
        if states:
            for name in self.state_names:
                step_inputs[name] = states[name]

        return step_inputs
def get_step_inputs(self, input_var, states=None, mask=None, additional_inputs=None):
        """
        :type input_var: T.var
        :rtype: dict
        """
        step_inputs = {}
        if self._input_type == "sequence":
            if not additional_inputs:
                additional_inputs = []
            if mask:
                step_inputs['mask'] = mask.dimshuffle(1, 0)
            step_inputs.update(self.merge_inputs(input_var, additional_inputs=additional_inputs))
        else:
            # step_inputs["mask"] = mask.dimshuffle((1,0)) if mask else None
            if additional_inputs:
                step_inputs.update(self.merge_inputs(None, additional_inputs=additional_inputs))
        if states:
            for name in self.state_names:
                step_inputs[name] = states[name]

        return step_inputs
def get_step_inputs ( self , input_var , states = None , mask = None , additional_inputs = None ) : step_inputs = { } if self . _input_type == "sequence" : if not additional_inputs : additional_inputs = [ ] if mask : step_inputs [ 'mask' ] = mask . dimshuffle ( 1 , 0 ) step_inputs . update ( self . merge_inputs ( input_var , additional_inputs = additional_inputs ) ) else : # step_inputs["mask"] = mask.dimshuffle((1,0)) if mask else None if additional_inputs : step_inputs . update ( self . merge_inputs ( None , additional_inputs = additional_inputs ) ) if states : for name in self . state_names : step_inputs [ name ] = states [ name ] return step_inputs
:type input_var: T.var
        :rtype: dict
: type input_var : T . var : rtype : dict