MCPcopy Create free account

hub / github.com/JonasGeiping/data-poisoning / functions

Functions297 in github.com/JonasGeiping/data-poisoning

Method_save_image
Save input image to given location, add poison_delta if necessary.
forest/data/kettle_base.py:282
Method_torch_to_PIL
Torch->PIL pipeline as in torchvision.utils.save_image.
forest/data/kettle_base.py:275
Methodapply_dropout
https://discuss.pytorch.org/t/dropout-at-test-time-in-densenet/6738/6.
forest/victims/victim_ensemble.py:192
Methodapply_dropout
https://discuss.pytorch.org/t/dropout-at-test-time-in-densenet/6738/6.
forest/victims/victim_single.py:132
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:74
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:151
Methodattack
Attack within given constraints with task as in _objective. This is effectively a slight mixing. with mixing factor lmb = 1 - eps / 255.
forest/victims/batched_attacks.py:166
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:354
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:428
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:482
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:512
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:552
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:598
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:649
Methodattack
Attack within given constraints with task as in _objective.
forest/victims/batched_attacks.py:701
Functioncallback
(operation_future)
forest/gcloud.py:320
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_convex_polytope.py:21
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_htbd.py:181
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_base.py:311
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_poison_frogs.py:23
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_matching.py:23
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_matching.py:106
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_matching.py:277
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_matching.py:321
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_bullseye.py:19
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_metapoison.py:29
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_metapoison.py:58
Methodclosure
This function will be evaluated on all GPUs.
forest/witchcoven/witch_metapoison.py:86
Methodcompute
Compute function on all models and join computations. Distributed hmm
forest/victims/victim_distributed.py:166
Methodcompute
Compute function on all models. Function has arguments that are possibly sequences of length args.ensemble
forest/victims/victim_ensemble.py:224
Methodcompute
r"""Compute function on the given optimization problem, defined by criterion \circ model. Function has arguments: model, criterion
forest/victims/victim_single.py:158
Methodcorrected_loss
Compute loss. This is just a normal loss for cutout.
forest/data/mixing_data_augmentations.py:65
Methodcorrected_loss
Compute loss. Here the loss is computed as worst-case estimate over the trials.
forest/data/mixing_data_augmentations.py:155
Methodcriterion
(outputs, labels)
forest/witchcoven/witch_htbd.py:149
Methodcriterion
(outputs, labels)
forest/witchcoven/witch_base.py:279
Methodcriterion
(outputs, labels)
forest/witchcoven/witch_matching.py:244
Functioncw_loss
Carlini-Wagner loss for brewing [Liam's version].
forest/utils.py:76
Functioncw_loss2
CW variant 2. This is assert-level equivalent.
forest/utils.py:89
Methoddistributed_control
Control distributed poison brewing, no-op in single network training.
forest/victims/victim_distributed.py:139
Methodeval
Switch everything into evaluation mode.
forest/victims/victim_ensemble.py:190
Methodeval
Switch everything into evaluation mode.
forest/victims/victim_single.py:130
Methodforward
(self, x, randgen=None)
forest/data/diff_data_augmentation.py:59
Methodforward
(self, x, y, epoch=None)
forest/data/mixing_data_augmentations.py:24
Methodforward
run cutout.
forest/data/mixing_data_augmentations.py:57
Methodforward
run cutmix.
forest/data/mixing_data_augmentations.py:103
Methodforward
(self, x, y, epoch=None)
forest/data/mixing_data_augmentations.py:139
Methodforward
(self, input)
forest/victims/models.py:185
Methodforward
(self, x)
forest/victims/mobilenet.py:77
Methodforward
(self, x, penu=False)
forest/victims/mobilenet.py:185
Methodforward
(self, x)
forest/victims/vgg.py:50
Methodforward
Live Patch ... :> ...
forest/witchcoven/modules.py:26
Methodfreeze_feature_extractor
Freezes all parameters and then unfreeze the last layer.
forest/victims/victim_ensemble.py:84
Methodfreeze_feature_extractor
Freezes all parameters and then unfreeze the last layer.
forest/victims/victim_single.py:78
Functiongenerate_plot_centroid
(feat_path,model_path,target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:12
Functiongenerate_plot_centroid_3d_labels
(feat_path, model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:163
Functiongenerate_plot_lda
(feat_path,model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:508
Functiongenerate_plot_lda_patch
(feat_path,model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:292
Functiongenerate_plot_pca
(feat_path,model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:88
Functiongenerate_plots
(main_path,model_name, plot_function, target_class, base_class,poison_ids,device)
plotting/featurespace_visualizations.py:730
Functiongenplot_centroid_3d_patch
(feat_path, model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:428
Functiongenplot_centroid_prob_2d
(feat_path, model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:649
Functiongenplot_centroid_prob_2d_patch
(feat_path, model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:347
Functiongenplot_centroid_prob_3d
(feat_path, model_path, target_class,base_class, poison_ids, title, device)
plotting/featurespace_visualizations.py:561
Methodget_penultimate_params_list
(self)
forest/victims/mobilenet.py:192
Methodget_target
Return only the target and its id. Args: index (int): Index Returns: tuple: (target, idx) where target is cl
forest/data/datasets.py:186
Methodget_target
Return only the target and its id. Args: index (int): Index Returns: tuple: (target, idx) where target is cl
forest/data/datasets.py:231
Methodget_target
Return only the target and its id. Args: index (int): Index Returns: tuple: (target, idx) where target is cl
forest/data/datasets.py:349
Methodget_target
Return only the target and its id.
forest/data/datasets.py:488
Methodgradient
Compute the gradient of criterion(model) w.r.t to given data.
forest/victims/victim_ensemble.py:207
Methodgradient
Compute the gradient of criterion(model) w.r.t to given data.
forest/victims/victim_single.py:144
Methodinitialize
(self, pretrain=False, seed=None)
forest/victims/victim_distributed.py:39
Methodinitialize
(self, pretrain=False, seed=None)
forest/victims/victim_ensemble.py:28
Methodinitialize
(self, pretrain=False, seed=None)
forest/victims/victim_single.py:28
Methodload_feature_representation
(self)
forest/victims/victim_ensemble.py:99
Methodload_feature_representation
(self)
forest/victims/victim_single.py:90
Functionoptions
Construct the central argument parser, filled with useful defaults. The first block is essential to test poisoning in different scenarios. Th
forest/options.py:5
Methodpatch_targets
(self, kettle)
forest/witchcoven/witch_patch.py:45
Methodpatch_targets
(self, kettle)
forest/witchcoven/witch_htbd.py:206
Methodprepare_experiment
Choose targets from some label which will be poisoned toward some other chosen label, by modifying some subset of the training data within som
forest/data/kettle_det_experiment.py:17
Methodprepare_experiment
Choose targets from some label which will be poisoned toward some other chosen label, by modifying some subset of the training data within som
forest/data/kettle_random_experiment.py:18
Methodprepare_experiment
Choose targets from some label which will be poisoned toward some other chosen label. Using the subset of the training data within some bound
forest/data/kettle_benchmark_experiment.py:16
Functionrecord_results
Save output to a csv table.
forest/utils.py:130
Methodreinitialize_last_layer
(self, reduce_lr_factor=1.0, seed=None)
forest/victims/victim_distributed.py:57
Methodreinitialize_last_layer
(self, reduce_lr_factor=1.0, seed=None, keep_last_layer=False)
forest/victims/victim_ensemble.py:51
Methodreinitialize_last_layer
(self, reduce_lr_factor=1.0, seed=None, keep_last_layer=False)
forest/victims/victim_single.py:46
Methodreset_last_layer
(self)
forest/victims/mobilenet.py:195
Methodreset_learning_rate
Reset scheduler objects to initial state.
forest/victims/victim_ensemble.py:200
Methodreset_learning_rate
Reset scheduler object to initial state.
forest/victims/victim_single.py:140
Methodreset_learning_rate
Reset scheduler object to initial state.
forest/victims/victim_base.py:74
Methodsave_feature_representation
(self)
forest/victims/victim_ensemble.py:94
Methodsave_feature_representation
(self)
forest/victims/victim_single.py:87
Functionset_deterministic
Switch pytorch into a deterministic computation mode.
forest/utils.py:240
Methodset_testdp
(self, dp)
forest/victims/mobilenet.py:172
Methodstep
Step through a model epoch. Optionally minimize target loss during this. This function is limited because it assumes that defs.batch_size, de
forest/victims/victim_ensemble.py:158
Methodsync_gradients
Sync gradients of given variable across all workers.
forest/victims/victim_distributed.py:161
Functionsystem_startup
Decide and print GPU / CPU / hostname info.
forest/utils.py:17
Functiontest
()
forest/victims/vgg.py:70
← previous201–297 of 297, ranked by callers