Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/THUYimingLi/BackdoorBox
/ functions
Functions
664 in github.com/THUYimingLi/BackdoorBox
⨍
Functions
664
◇
Types & classes
179
Method
get_model
(self)
core/defenses/NAD.py:92
Method
get_model
Return trained model. Should call ABL.train() first to train model.
core/defenses/ABL.py:165
Method
get_model
(self)
core/defenses/CutMix.py:56
Method
get_model
(self)
core/defenses/MCR.py:393
Method
get_model
(self, return_NC=False)
core/attacks/Blind.py:491
Method
get_model
(self)
core/attacks/base.py:100
Method
get_model
(self)
core/attacks/ISSBA.py:626
Method
get_model
(self)
core/attacks/LIRA.py:366
Method
get_poisoned_dataset
Train or Test must be called before you call this function
core/attacks/Blind.py:828
Method
get_poisoned_dataset
(self)
core/attacks/base.py:103
Method
get_poisoned_dataset
Return the poisoned dataset.
core/attacks/ISSBA.py:632
Method
get_poisoned_dataset
Return the poisoned dataset.
core/attacks/LIRA.py:372
Method
get_poisoned_dataset
must call train to craft poisoned dataset before call this function
core/attacks/SleeperAgent.py:306
Method
import_base_buffers
(self, base_model)
core/models/curves.py:287
Function
l2_regularizer
(weight_decay)
core/models/curves.py:326
Method
layer_hook
(module, inp, out)
core/defenses/Spectral.py:132
Function
my_imread
(file_path)
core/attacks/LabelConsistent.py:26
Function
parse
(x)
core/attacks/ISSBA.py:77
Method
predict
Apply AutoEncoder defense method to input data and get the predicts. Args: model (torch.nn.Module): Network. data (to
core/defenses/AutoEncoderDefense.py:216
Method
predict
Apply ShrinkPad defense method to input data and get the predicts. Args: model (torch.nn.Module): Network. data (torc
core/defenses/ShrinkPad.py:110
Function
preprocess_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
Method
re_init
(self, device)
core/attacks/Blind.py:48
Function
read_image
(img_path, type=None)
tests/test_LIRA.py:67
Function
read_image
(img_path, type=None)
tests/test_IAD.py:25
Function
read_image
(img_path, type=None)
tests/test_ISSBA.py:25
Method
repair
Perform CutMix defense method based on attacked models. The repaired model will be stored in self.model Args: da
core/defenses/CutMix.py:189
Method
repair
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
Function
reset_bn
(module)
core/defenses/MCR.py:43
Method
set_attack_mode
r""" Set the attack mode. Arguments: mode (str) : 'original' (DEFAULT) 'targeted' - Use input
core/utils/torchattacks/attack.py:39
Method
test
(self, testset, poisoned_testset)
core/defenses/IBD_PSC.py:155
Method
test
Test AutoEncoder on dataset. Args: model (torch.nn.Module): Network. dataset (types in support_list): Dataset.
core/defenses/AutoEncoderDefense.py:254
Method
test
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/NAD.py:287
Method
test
compute metrics: accuracy, precision, recall, F1. Args: poisoned_location (frozenset): poisoned id in clean_dataset
core/defenses/Spectral.py:175
Method
test
Test unet on dataset. Args: model (torch.nn.Module): Network. dataset (types in support_list): Dataset. s
core/defenses/REFINE.py:338
Method
test
(self, testset, poisoned_testset)
core/defenses/SCALE_UP.py:119
Method
test
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/CutMix.py:205
Method
test
Test ShrinkPad on dataset. Args: model (torch.nn.Module): Network. dataset (types in support_list): Dataset.
core/defenses/ShrinkPad.py:161
Method
test
Test repaired curve model on dataset Args: dataset (types in support_list): Dataset. schedule (dict): Schedule for te
core/defenses/MCR.py:310
Method
test
(self, schedule=None, model=None, nc_model=None, test_dataset=None)
core/attacks/Blind.py:673
Method
test
(self, schedule=None, model=None, test_dataset=None, poisoned_test_dataset=None, test_loss=None)
core/attacks/base.py:319
Method
test
(self, schedule=None, model=None, test_dataset=None, poisoned_test_dataset=None)
core/attacks/ISSBA.py:1029
Method
test
(self, schedule=None, model=None, atkmodel=None, test_dataset=None, poisoned_test_dataset=None)
core/attacks/LIRA.py:963
Method
test_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
Method
test_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
Function
test_without_defense
(model_name, dataset_name, attack_name, defense_name, benign_dataset, attacked_dataset, defense, y_target)
tests/test_CutMix.py:34
Method
train
(self, schedule=None)
core/attacks/base.py:118
Method
train
(self, schedule=None)
core/attacks/ISSBA.py:770
Function
vgg11
VGG 11-layer model (configuration "A") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:82
Function
vgg11
VGG 11-layer model (configuration "A") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:61
Function
vgg11_bn
VGG 11-layer model (configuration "A") with batch normalization
core/models/vgg_curve.py:91
Function
vgg11_bn
VGG 11-layer model (configuration "A") with batch normalization
core/models/vgg.py:70
Function
vgg13
VGG 13-layer model (configuration "B") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:97
Function
vgg13
VGG 13-layer model (configuration "B") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:76
Function
vgg13_bn
VGG 13-layer model (configuration "B") with batch normalization
core/models/vgg_curve.py:106
Function
vgg13_bn
VGG 13-layer model (configuration "B") with batch normalization
core/models/vgg.py:85
Function
vgg16
VGG 16-layer model (configuration "D") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:112
Function
vgg16
VGG 16-layer model (configuration "D") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:91
Function
vgg16_bn
VGG 16-layer model (configuration "D") with batch normalization
core/models/vgg_curve.py:121
Function
vgg16_bn
VGG 16-layer model (configuration "D") with batch normalization
core/models/vgg.py:100
Function
vgg19
VGG 19-layer model (configuration "E") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg_curve.py:127
Function
vgg19
VGG 19-layer model (configuration "E") Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
core/models/vgg.py:106
Function
vgg19_bn
VGG 19-layer model (configuration 'E') with batch normalization
core/models/vgg_curve.py:136
Function
vgg19_bn
VGG 19-layer model (configuration 'E') with batch normalization
core/models/vgg.py:115
Method
weights
(self, t)
core/models/curves.py:305
← previous
601–664 of 664, ranked by callers