MCPcopy Create free account

hub / github.com/THUYimingLi/BackdoorBox / functions

Functions664 in github.com/THUYimingLi/BackdoorBox

Methodget_model
(self)
core/defenses/NAD.py:92
Methodget_model
Return trained model. Should call ABL.train() first to train model.
core/defenses/ABL.py:165
Methodget_model
(self)
core/defenses/CutMix.py:56
Methodget_model
(self)
core/defenses/MCR.py:393
Methodget_model
(self, return_NC=False)
core/attacks/Blind.py:491
Methodget_model
(self)
core/attacks/base.py:100
Methodget_model
(self)
core/attacks/ISSBA.py:626
Methodget_model
(self)
core/attacks/LIRA.py:366
Methodget_poisoned_dataset
Train or Test must be called before you call this function
core/attacks/Blind.py:828
Methodget_poisoned_dataset
(self)
core/attacks/base.py:103
Methodget_poisoned_dataset
Return the poisoned dataset.
core/attacks/ISSBA.py:632
Methodget_poisoned_dataset
Return the poisoned dataset.
core/attacks/LIRA.py:372
Methodget_poisoned_dataset
must call train to craft poisoned dataset before call this function
core/attacks/SleeperAgent.py:306
Methodimport_base_buffers
(self, base_model)
core/models/curves.py:287
Functionl2_regularizer
(weight_decay)
core/models/curves.py:326
Methodlayer_hook
(module, inp, out)
core/defenses/Spectral.py:132
Functionmy_imread
(file_path)
core/attacks/LabelConsistent.py:26
Functionparse
(x)
core/attacks/ISSBA.py:77
Methodpredict
Apply AutoEncoder defense method to input data and get the predicts. Args: model (torch.nn.Module): Network. data (to
core/defenses/AutoEncoderDefense.py:216
Methodpredict
Apply ShrinkPad defense method to input data and get the predicts. Args: model (torch.nn.Module): Network. data (torc
core/defenses/ShrinkPad.py:110
Functionpreprocess_vggface2
Efficiently preprocess the VGGFace2 dataset and split it into training and validation sets. Workflow: 1. Scan the train and test director
tests/test_BAAT.py:185
Methodre_init
(self, device)
core/attacks/Blind.py:48
Functionread_image
(img_path, type=None)
tests/test_LIRA.py:67
Functionread_image
(img_path, type=None)
tests/test_IAD.py:25
Functionread_image
(img_path, type=None)
tests/test_ISSBA.py:25
Methodrepair
Perform CutMix defense method based on attacked models. The repaired model will be stored in self.model Args: da
core/defenses/CutMix.py:189
Methodrepair
Perform MCR defense method based on attacked models (staring point and the end point). The repaired model will be stored in self.model (Curve
core/defenses/MCR.py:260
Functionreset_bn
(module)
core/defenses/MCR.py:43
Methodset_attack_mode
r""" Set the attack mode. Arguments: mode (str) : 'original' (DEFAULT) 'targeted' - Use input
core/utils/torchattacks/attack.py:39
Methodtest
(self, testset, poisoned_testset)
core/defenses/IBD_PSC.py:155
Methodtest
Test AutoEncoder on dataset. Args: model (torch.nn.Module): Network. dataset (types in support_list): Dataset.
core/defenses/AutoEncoderDefense.py:254
Methodtest
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/NAD.py:287
Methodtest
compute metrics: accuracy, precision, recall, F1. Args: poisoned_location (frozenset): poisoned id in clean_dataset
core/defenses/Spectral.py:175
Methodtest
Test unet on dataset. Args: model (torch.nn.Module): Network. dataset (types in support_list): Dataset. s
core/defenses/REFINE.py:338
Methodtest
(self, testset, poisoned_testset)
core/defenses/SCALE_UP.py:119
Methodtest
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/CutMix.py:205
Methodtest
Test ShrinkPad on dataset. Args: model (torch.nn.Module): Network. dataset (types in support_list): Dataset.
core/defenses/ShrinkPad.py:161
Methodtest
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/MCR.py:310
Methodtest
(self, schedule=None, model=None, nc_model=None, test_dataset=None)
core/attacks/Blind.py:673
Methodtest
(self, schedule=None, model=None, test_dataset=None, poisoned_test_dataset=None, test_loss=None)
core/attacks/base.py:319
Methodtest
(self, schedule=None, model=None, test_dataset=None, poisoned_test_dataset=None)
core/attacks/ISSBA.py:1029
Methodtest
(self, schedule=None, model=None, atkmodel=None, test_dataset=None, poisoned_test_dataset=None)
core/attacks/LIRA.py:963
Methodtest_acc
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/IBD_PSC.py:69
Methodtest_acc
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/SCALE_UP.py:39
Functiontest_without_defense
(model_name, dataset_name, attack_name, defense_name, benign_dataset, attacked_dataset, defense, y_target)
tests/test_CutMix.py:34
Methodtrain
(self, schedule=None)
core/attacks/base.py:118
Methodtrain
(self, schedule=None)
core/attacks/ISSBA.py:770
Functionvgg11
VGG 11-layer model (configuration "A") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:82
Functionvgg11
VGG 11-layer model (configuration "A") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:61
Functionvgg11_bn
VGG 11-layer model (configuration "A") with batch normalization
core/models/vgg_curve.py:91
Functionvgg11_bn
VGG 11-layer model (configuration "A") with batch normalization
core/models/vgg.py:70
Functionvgg13
VGG 13-layer model (configuration "B") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:97
Functionvgg13
VGG 13-layer model (configuration "B") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:76
Functionvgg13_bn
VGG 13-layer model (configuration "B") with batch normalization
core/models/vgg_curve.py:106
Functionvgg13_bn
VGG 13-layer model (configuration "B") with batch normalization
core/models/vgg.py:85
Functionvgg16
VGG 16-layer model (configuration "D") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:112
Functionvgg16
VGG 16-layer model (configuration "D") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:91
Functionvgg16_bn
VGG 16-layer model (configuration "D") with batch normalization
core/models/vgg_curve.py:121
Functionvgg16_bn
VGG 16-layer model (configuration "D") with batch normalization
core/models/vgg.py:100
Functionvgg19
VGG 19-layer model (configuration "E") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:127
Functionvgg19
VGG 19-layer model (configuration "E") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:106
Functionvgg19_bn
VGG 19-layer model (configuration 'E') with batch normalization
core/models/vgg_curve.py:136
Functionvgg19_bn
VGG 19-layer model (configuration 'E') with batch normalization
core/models/vgg.py:115
Methodweights
(self, t)
core/models/curves.py:305
← previous601–664 of 664, ranked by callers