@recurrent(sequences=['inputs', 'mask'],
               states=['states', 'weights', 'add'],
               outputs=['states', 'weights', 'add'], contexts=[])
    def apply(self, inputs, states, weights, add,
              mask=None):
        new_states, new_weights = self.transition(states, weights, inputs)
        if mask:
            # In fact I don't really understand why we do this:
            # anyway states not covered by masks should have no effect
            # on the cost...
            new_states = tensor.cast(mask * new_states +
                                     (1. - mask) * states, 'int64')
            new_weights = mask * new_weights + (mask - 1.) * weights
        new_add = self.probability_computer(new_states, new_weights)
        return new_states, new_weights, new_add
dataset/ETHPy150Open rizar/attention-lvcsr/lvsr/bricks/language_models.py/FSTTransition.apply/swapped operands of `-`