@application
    def compute_energies(self, attended, preprocessed_attended,
                         previous_weights, states):
        if not preprocessed_attended:
            preprocessed_attended = self.preprocess(attended)
        transformed_states = self.state_transformers.apply(as_dict=True,
                                                           **states)
        # Broadcasting of transformed states should be done automatically
        match_vectors = sum(transformed_states.values(),
                            preprocessed_attended)
        conv_result = self.conv.apply(previous_weights)
        match_vectors += self.filter_handler.apply(
            conv_result[:, :, self.conv_n:-self.conv_n]
            .dimshuffle(0, 2, 1)).dimshuffle(1, 0, 2)
        energies = self.energy_computer.apply(match_vectors).reshape(
            match_vectors.shape[:-1], ndim=match_vectors.ndim - 1)
        return energies
dataset/ETHPy150Open rizar/attention-lvcsr/lvsr/bricks/attention.py/SequenceContentAndConvAttention.compute_energies/original