Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CausalLearning/HSJA
/ functions
Functions
24 in github.com/CausalLearning/HSJA
⨍
Functions
24
◇
Types & classes
2
↓ 6 callers
Function
decision_function
Decision function output 1 on the desired side of the boundary, 0 otherwise.
hsja.py:140
↓ 5 callers
Function
clip_image
(image, clip_min, clip_max)
hsja.py:152
↓ 5 callers
Function
resnet_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 callers
Function
compute_distance
(x_ori, x_pert, constraint = 'l2')
hsja.py:157
↓ 3 callers
Function
binary_search_batch
Binary search to approach the boundar.
hsja.py:214
↓ 3 callers
Method
predict
(self, x, verbose=0, batch_size = 500, logits = False)
build_model.py:76
↓ 2 callers
Function
project
(original_image, perturbed_images, alphas, params)
hsja.py:200
↓ 2 callers
Function
split_data
(x, y, model, num_classes = 10, split_rate = 0.8, sample_per_class = 100)
load_data.py:54
↓ 1 callers
Function
approximate_gradient
(model, sample, num_evals, delta, params)
hsja.py:165
↓ 1 callers
Function
attack
(args)
main.py:59
↓ 1 callers
Function
construct_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 callers
Function
construct_original_network
(dataset_name, model_name, train)
build_model.py:17
↓ 1 callers
Function
geometric_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 callers
Function
hsja
Main algorithm for HopSkipJumpAttack. Inputs: model: the object that has predict method. predict outputs probability scores. clip_max: upper
hsja.py:4
↓ 1 callers
Function
initialize
Efficient Implementation of BlendedUniformNoiseAttack in Foolbox.
hsja.py:268
↓ 1 callers
Function
phi
(epsilon)
hsja.py:316
↓ 1 callers
Function
resnet_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 callers
Function
select_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
Function
create_resnet_generator
(x_train)
resnet.py:231
Function
lr_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
Function
lr_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
Function
lr_schedule_sgd
(epoch)
resnet.py:78