guides/understanding_masking_and_padding.py/TemporalSoftmax/call
class TemporalSoftmax:    def call(self, inputs, mask=None):
        assert mask is not None
        broadcast_float_mask = ops.expand_dims(ops.cast(mask, "float32"), -1)
        inputs_exp = ops.exp(inputs) * broadcast_float_mask
        inputs_sum = ops.sum(
            inputs_exp * broadcast_float_mask, axis=-1, keepdims=True
        )
        return inputs_exp / inputs_sum