

@neural_computation
def step(self, step_inputs):
    new_states = self.compute_new_state(step_inputs)
    if ((self._output_type == 'one') and step_inputs.get('mask')):
        mask = step_inputs['mask'].dimshuffle(0, 'x')
        for state_name in new_states:
            new_states[state_name] = ((new_states[state_name] * mask) + (step_inputs[state_name] * (1 - mask)))
    return new_states

dataset/ETHPy150Open zomux/deepy/deepy/layers/recurrent.py RecurrentLayer.step/original