063c572b5b09fb8492beee938589cf5984f84926,art/estimators/classification/ensemble.py,EnsembleClassifier,loss_gradient,#EnsembleClassifier#Any#Any#Any#,260

Before Change


        :param raw: Return the individual classifier raw outputs (not aggregated).
        :return: Array of gradients of the same shape as `x`. If `raw=True`, shape becomes `[nb_classifiers, x.shape]`.
        
        grads = np.array(
            [
                self._classifier_weights[i] * self._classifiers[i].loss_gradient(x, y)
                for i in range(self._nb_classifiers)
            ]
        )
        if raw:
            return grads

        return np.sum(grads, axis=0)

    def __repr__(self):

After Change



        super().__init__(
            model=None,
            clip_values=clip_values,
            channel_index=channel_index,
            channels_first=channels_first,
            preprocessing_defences=preprocessing_defences,
            postprocessing_defences=postprocessing_defences,
            preprocessing=preprocessing,
        )
        self._nb_classifiers = len(classifiers)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 063c572b5b09fb8492beee938589cf5984f84926
Time: 2020-12-18
Author: beat.buesser@ie.ibm.com
File Name: art/estimators/classification/ensemble.py
Class Name: EnsembleClassifier
Method Name: loss_gradient


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 063c572b5b09fb8492beee938589cf5984f84926
Time: 2020-12-18
Author: beat.buesser@ie.ibm.com
File Name: art/estimators/classification/ensemble.py
Class Name: EnsembleClassifier
Method Name: class_gradient


Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: 50c97e8e67f93b09a1dd4b464732d48c704f6526
Time: 2018-06-04
Author: Andrew.Rowley@manchester.ac.uk
File Name: spynnaker/pyNN/models/neural_projections/connectors/multapse_connector.py
Class Name: MultapseConnector
Method Name: gen_connector_params