MCPcopy Create free account

hub / github.com/CausalLearning/HSJA / functions

Functions24 in github.com/CausalLearning/HSJA

↓ 6 callersFunctiondecision_function
Decision function output 1 on the desired side of the boundary, 0 otherwise.
hsja.py:140
↓ 5 callersFunctionclip_image
(image, clip_min, clip_max)
hsja.py:152
↓ 5 callersFunctionresnet_layer
2D Convolution-Batch Normalization-Activation stack builder # Arguments inputs (tensor): input tensor from input image or previous layer num_fil
resnet.py:84
↓ 4 callersFunctioncompute_distance
(x_ori, x_pert, constraint = 'l2')
hsja.py:157
↓ 3 callersFunctionbinary_search_batch
Binary search to approach the boundar.
hsja.py:214
↓ 3 callersMethodpredict
(self, x, verbose=0, batch_size = 500, logits = False)
build_model.py:76
↓ 2 callersFunctionproject
(original_image, perturbed_images, alphas, params)
hsja.py:200
↓ 2 callersFunctionsplit_data
(x, y, model, num_classes = 10, split_rate = 0.8, sample_per_class = 100)
load_data.py:54
↓ 1 callersFunctionapproximate_gradient
(model, sample, num_evals, delta, params)
hsja.py:165
↓ 1 callersFunctionattack
(args)
main.py:59
↓ 1 callersFunctionconstruct_model_and_data
Load model and data on which the attack is carried out. Assign target classes and images for targeted attack.
main.py:16
↓ 1 callersFunctionconstruct_original_network
(dataset_name, model_name, train)
build_model.py:17
↓ 1 callersFunctiongeometric_progression_for_stepsize
Geometric progression to search for stepsize. Keep decreasing stepsize by half until reaching the desired side of the boundary,
hsja.py:308
↓ 1 callersFunctionhsja
Main algorithm for HopSkipJumpAttack. Inputs: model: the object that has predict method. predict outputs probability scores. clip_max: upper
hsja.py:4
↓ 1 callersFunctioninitialize
Efficient Implementation of BlendedUniformNoiseAttack in Foolbox.
hsja.py:268
↓ 1 callersFunctionphi
(epsilon)
hsja.py:316
↓ 1 callersFunctionresnet_v2
ResNet Version 2 Model builder [b] Stacks of (1 x 1)-(3 x 3)-(1 x 1) BN-ReLU-Conv2D or also known as bottleneck layer First shortcut connection pe
resnet.py:129
↓ 1 callersFunctionselect_delta
Choose the delta at the scale of distance between x and perturbed sample.
hsja.py:326
Method__init__
(self, model_name, dataset_name, train = False, load = False, **kwargs)
build_model.py:53
Method__init__
(self, dataset_name)
load_data.py:15
Functioncreate_resnet_generator
(x_train)
resnet.py:231
Functionlr_schedule
Learning Rate Schedule Learning rate is scheduled to be reduced after 80, 120, 160, 180 epochs. Called automatically every epoch as part of callbac
resnet.py:29
Functionlr_schedule_cifar100
Learning Rate Schedule Learning rate is scheduled to be reduced after 80, 120, 160, 180 epochs. Called automatically every epoch as part of callbac
resnet.py:54
Functionlr_schedule_sgd
(epoch)
resnet.py:78