e877258f1d1735752e4adf64f41ae76b5ed570be,art/estimators/embedding/keras.py,KerasAdversarialEmbedding,fit,#KerasAdversarialEmbedding#Any#Any#Any#Any#,169

Before Change


        // poison pp_poison amound of training data
        self.embed_model.summary()
        selected_indices = np.random.uniform(size=len(x)) < self.pp_poison
        print("num selected indices: " + str(np.sum(selected_indices)))
        print("selected indices: " + str(selected_indices))
        poison_data, poison_labels = self.backdoor.poison(x[selected_indices], y=self.target, broadcast=True)

After Change


            train_data[idx] = poison_data[i]
            train_labels[idx] = poison_labels[i]

        is_backdoor = np.isin(np.arange(len(x)), poison_idxs).astype(int)
        is_backdoor = np.fromfunction(lambda b_idx: np.eye(2)[is_backdoor[b_idx]], shape=(len(x),), dtype=int)

        // TODO: standardize
        self.train_data, self.train_labels, self.is_backdoor = train_data, train_labels, is_backdoor
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: e877258f1d1735752e4adf64f41ae76b5ed570be
Time: 2020-08-11
Author: ebube.chuba@ibm.com
File Name: art/estimators/embedding/keras.py
Class Name: KerasAdversarialEmbedding
Method Name: fit


Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 580d9689d5f369a62c4a4ff5ecd8a8776d477ee1
Time: 2019-08-30
Author: bodo.rueckauer@intel.com
File Name: scripts/utils.py
Class Name: ExpResults
Method Name: set_spikestats


Project Name: idaholab/raven
Commit Name: 078b2512f26bfb20aa3ecbb6a065008bf7d45753
Time: 2020-06-30
Author: mohammad.abdo@inl.gov
File Name: framework/Optimizers/fitness/fitness.py
Class Name:
Method Name: invLinear


Project Name: prody/ProDy
Commit Name: fa926b8278a3b635d929e0fe6c63ac2a8983a406
Time: 2012-12-15
Author: lordnapi@gmail.com
File Name: lib/prody/dynamics/nma.py
Class Name: NMA
Method Name: __getitem__