Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AI-secure/CRFL
/ functions
Functions
107 in github.com/AI-secure/CRFL
⨍
Functions
107
◇
Types & classes
23
↓ 10 callers
Method
get_batch
(self, train_data, bptt, evaluation=False)
utils/loan_helper.py:70
↓ 7 callers
Method
get_poison_batch
(self, bptt,feature_dict, evaluation=False)
utils/loan_helper.py:79
↓ 6 callers
Method
load_data
(self,params_loaded)
utils/loan_helper.py:156
↓ 5 callers
Method
get_testloader
(self)
utils/loan_helper.py:46
↓ 4 callers
Method
SetIsTrain
(self,isTrain)
utils/loan_helper.py:243
↓ 4 callers
Method
create_model
(self)
utils/loan_helper.py:130
↓ 4 callers
Function
eval_model
(model, helper, is_poison=False)
smooth_mnist.py:15
↓ 4 callers
Method
l2dist
L2 distance between p1, p2, each of which is a list of nd-arrays
utils/helper.py:178
↓ 4 callers
Method
save_checkpoint
(self, state, is_best, filename='checkpoint.pth.tar')
utils/helper.py:45
↓ 3 callers
Method
add_pixel_pattern
(self,ori_image,adversarial_index)
utils/image_helper.py:218
↓ 2 callers
Method
add_pattern
(self,ori_data,feature_dict)
utils/loan_helper.py:111
↓ 2 callers
Method
at_radii
(self, radii: np.ndarray)
certify_emnist.py:18
↓ 2 callers
Method
at_radii
(self, radii: np.ndarray)
certify_loan.py:25
↓ 2 callers
Method
at_radii
(self, radii: np.ndarray)
certify_mnist.py:19
↓ 2 callers
Function
cal_prob_bound
(pa, pb, sigma_test,epoch, training_params,agg_weight=None)
certify_emnist.py:102
↓ 2 callers
Function
cal_prob_bound
(pa, pb, sigma_test,epoch, training_params,agg_weight=None)
certify_loan.py:109
↓ 2 callers
Function
cal_prob_bound
(pa, pb, sigma_test,epoch, training_params,agg_weight=None)
certify_mnist.py:104
↓ 2 callers
Function
certify
(smoothed_fname,agg_weight=None, M=0, alpha= 0)
certify_emnist.py:141
↓ 2 callers
Function
certify
(smoothed_fname,agg_weight=None, M=0, alpha= 0)
certify_loan.py:146
↓ 2 callers
Function
certify
(smoothed_fname,agg_weight=None, M=0, alpha= 0)
certify_mnist.py:143
↓ 2 callers
Method
geometric_median_objective
Compute geometric median objective.
utils/helper.py:187
↓ 2 callers
Method
model_global_norm
(model)
utils/helper.py:54
↓ 2 callers
Function
probability_estimation
(labs,model_preds)
smooth_mnist.py:53
↓ 2 callers
Method
weighted_average_oracle
Computes weighted average of atoms with specified weights Args: points: list, whose weighted average we wish to calculate
utils/helper.py:197
↓ 1 callers
Method
at_radius
(self, radius: float)
certify_emnist.py:33
↓ 1 callers
Method
at_radius
(self, radius: float)
certify_emnist.py:46
↓ 1 callers
Method
at_radius
(self, radius: float)
certify_loan.py:40
↓ 1 callers
Method
at_radius
(self, radius: float)
certify_loan.py:53
↓ 1 callers
Method
at_radius
(self, radius: float)
certify_mnist.py:34
↓ 1 callers
Method
at_radius
(self, radius: float)
certify_mnist.py:47
↓ 1 callers
Method
average_models_params
Perform FedAvg algorithm on model params
utils/helper.py:83
↓ 1 callers
Method
build_classes_dict
(self)
utils/image_helper.py:54
↓ 1 callers
Function
certificate_over_model
(model, model_fname, helper, N_m, sigma)
smooth_mnist.py:88
↓ 1 callers
Function
certificate_over_model
(model, model_fname, helper, N_m, sigma)
smooth_emnist.py:91
↓ 1 callers
Function
certificate_over_model
(model, model_fname, helper, N_m, sigma)
smooth_loan.py:100
↓ 1 callers
Method
clip_weight_norm
(model,clip)
utils/helper.py:61
↓ 1 callers
Method
copy_params
(self, state_dict, coefficient_transfer=100)
models/simple.py:24
↓ 1 callers
Function
dp_noise
(param, sigma)
smooth_mnist.py:44
↓ 1 callers
Function
dp_noise
(param, sigma)
smooth_emnist.py:47
↓ 1 callers
Function
dp_noise
(param, sigma)
smooth_loan.py:56
↓ 1 callers
Method
dp_noise
(param, sigma)
utils/helper.py:76
↓ 1 callers
Method
geometric_median_update
Computes geometric median of atoms with weights alphas using Weiszfeld's Algorithm
utils/helper.py:107
↓ 1 callers
Method
get_test
(self)
utils/image_helper.py:172
↓ 1 callers
Method
get_train_iid
This method equally splits the dataset. :param params: :param all_range: :param model_no: :return:
utils/image_helper.py:155
↓ 1 callers
Method
get_trainloader
This method is used along with Dirichlet distribution :param params: :param indices: :return:
utils/loan_helper.py:33
↓ 1 callers
Method
load_data
(self, filename='./data/loan/loan_IA.csv')
utils/loan_helper.py:27
↓ 1 callers
Method
poison_test_dataset
(self)
utils/image_helper.py:64
↓ 1 callers
Function
probability_estimation
(labs,model_preds)
smooth_emnist.py:56
↓ 1 callers
Function
probability_estimation
(labs,model_preds)
smooth_loan.py:65
↓ 1 callers
Method
save_model
(self, model=None, epoch=0, val_loss=0)
utils/helper.py:222
↓ 1 callers
Function
smooth_model
(target_model, sigma)
smooth_mnist.py:48
↓ 1 callers
Function
smooth_model
(target_model, sigma)
smooth_emnist.py:51
↓ 1 callers
Function
smooth_model
(target_model, sigma)
smooth_loan.py:60
Function
FLtrain
(helper, start_epoch, local_model, target_model, is_poison,agent_name_keys)
train.py:11
Method
__getitem__
(self, index)
utils/loan_helper.py:235
Method
__init__
(self, smoothed_fname,agg_weight=None,M=0,alpha= 0)
certify_emnist.py:24
Method
__init__
(self, smoothed_fname, agg_weight=None,M=0,alpha= 0)
certify_emnist.py:37
Method
__init__
(self, quantity: Accuracy, legend: str, plot_fmt: str = "", scale_x: float = 1)
certify_emnist.py:51
Method
__init__
(self, smoothed_fname,agg_weight=None,M=0,alpha= 0)
certify_loan.py:31
Method
__init__
(self, smoothed_fname, agg_weight=None,M=0,alpha= 0)
certify_loan.py:44
Method
__init__
(self, quantity: Accuracy, legend: str, plot_fmt: str = "", scale_x: float = 1)
certify_loan.py:58
Method
__init__
(self, smoothed_fname,agg_weight=None,M=0,alpha= 0)
certify_mnist.py:25
Method
__init__
(self, smoothed_fname, agg_weight=None,M=0,alpha= 0)
certify_mnist.py:38
Method
__init__
(self, quantity: Accuracy, legend: str, plot_fmt: str = "", scale_x: float = 1)
certify_mnist.py:52
Method
__init__
(self, params)
utils/loan_helper.py:23
Method
__init__
Args: csv_file (string): Path to the csv file with annotations.
utils/loan_helper.py:200
Method
__init__
(self, current_time, params, name)
utils/helper.py:17
Method
__init__
(self, name=None, created_time=None)
models/simple.py:13
Method
__init__
(self, name=None, created_time=None,num_of_classes = 47)
models/EmnistNet.py:12
Method
__init__
(self, in_dim=90, out_dim=9, name=None, created_time=None)
models/loan_model.py:11
Method
__init__
(self, name=None, created_time=None,num_of_classes = 10)
models/MnistNet.py:12
Method
__len__
(self)
utils/loan_helper.py:229
Function
add_global_acc_result
(acc)
utils/csv_record.py:57
Function
add_norm_result
(norm)
utils/csv_record.py:61
Function
add_weight_result
(name,weight,alpha)
utils/csv_record.py:65
Function
adv_test
(helper, epoch, model, is_poison=False, visualize=True, agent_name_key="")
test.py:51
Method
at_radii
(self, radii: np.ndarray)
certify_emnist.py:30
Method
at_radii
(self, radii: np.ndarray)
certify_emnist.py:43
Method
at_radii
(self, radii: np.ndarray)
certify_loan.py:37
Method
at_radii
(self, radii: np.ndarray)
certify_loan.py:50
Method
at_radii
(self, radii: np.ndarray)
certify_mnist.py:31
Method
at_radii
(self, radii: np.ndarray)
certify_mnist.py:44
Function
clean_test
(helper, epoch, model, is_poison=False, visualize=True, agent_name_key="")
test.py:7
Method
create_model
(self)
utils/image_helper.py:18
Function
eval_model
(model, helper, is_poison=False)
smooth_emnist.py:18
Function
eval_model
(model, helper, is_poison=False)
smooth_loan.py:18
Method
forward
(self, input)
models/EmnistNet.py:8
Method
forward
(self, x)
models/EmnistNet.py:19
Method
forward
(self, x)
models/loan_model.py:19
Method
forward
(self, input)
models/MnistNet.py:8
Method
forward
(self, x)
models/MnistNet.py:20
Method
getPortion
(self,loan_status=0)
utils/loan_helper.py:246
Method
get_batch
(self, train_data, bptt, evaluation=False)
utils/image_helper.py:179
Method
get_poison_batch
(self, bptt,adversarial_index=-1, evaluation=False)
utils/image_helper.py:188
Method
get_poison_testloader
(self)
utils/loan_helper.py:62
Method
get_poison_trainloader
(self)
utils/loan_helper.py:55
Method
get_train
This method is used along with Dirichlet distribution :param params: :param indices: :return:
utils/image_helper.py:142
Method
load_data
(self)
utils/image_helper.py:89
Function
plot_certified_accuracy
(outfile: str, title: str, max_radius: float, lines: List[Line], radius_step: floa
certify_emnist.py:58
Function
plot_certified_accuracy
(outfile: str, title: str, max_radius: float, lines: List[Line], radius_step: floa
certify_loan.py:65
next →
1–100 of 107, ranked by callers