Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/JianXu95/FedPAC
/ functions
Functions
84 in github.com/JianXu95/FedPAC
⨍
Functions
84
◇
Types & classes
8
↓ 6 callers
Function
cifar_iid
Sample I.I.D. client data from CIFAR10 dataset :param dataset: :param num_users: :return: dict of image index
data_loader.py:222
↓ 6 callers
Function
cifar_noniid_s
Sample non-I.I.D client data from MNIST dataset :param dataset: :param num_users: :return:
data_loader.py:305
↓ 5 callers
Method
local_training
(self, local_epoch, round=0)
methods/fedavg.py:47
↓ 4 callers
Function
average_weights_weighted
Returns the average of the weights.
tools.py:61
↓ 4 callers
Method
local_test
(self, test_loader, test_model=None)
methods/fedavg.py:29
↓ 4 callers
Method
local_test
(self, test_loader)
methods/fedper.py:26
↓ 4 callers
Function
mnist_iid
Sample I.I.D. client data from MNIST dataset :param dataset: :param num_users: :return: dict of image index
data_loader.py:17
↓ 3 callers
Method
local_test
(self, test_loader)
methods/fedpac.py:67
↓ 3 callers
Method
update_local_model
(self, global_weight)
methods/fedavg.py:44
↓ 2 callers
Function
cinic10_imagenet
()
data_loader.py:752
↓ 2 callers
Function
cinic_separate_iid
Sample I.I.D. client data from CINIC-10 dataset :param dataset: :param num_users: :return: dict of image index
data_loader.py:377
↓ 2 callers
Function
cinic_separate_noniid_s
Sample non-I.I.D client data from MNIST dataset :param dataset: :param num_users: :return:
data_loader.py:510
↓ 2 callers
Function
emnist_noniid_s
Sample non-I.I.D client data from MNIST dataset :param dataset: :param num_users: :return:
data_loader.py:145
↓ 2 callers
Method
get_local_protos
(self)
methods/fedpac.py:111
↓ 2 callers
Method
local_test
(self, test_loader)
methods/local.py:19
↓ 2 callers
Method
local_test
(self, test_loader)
methods/lg_fedavg.py:27
↓ 2 callers
Function
mnist_noniid_s
Sample non-I.I.D client data from MNIST dataset :param dataset: :param num_users: :return:
data_loader.py:77
↓ 1 callers
Method
__init__
(self, num_classes=10)
models/cnn.py:7
↓ 1 callers
Function
agg_classifier_weighted_p
Returns the average of the weights.
tools.py:76
↓ 1 callers
Method
aggregate_weight
(self)
methods/fedavg.py:24
↓ 1 callers
Method
aggregate_weight
(self)
methods/lg_fedavg.py:22
↓ 1 callers
Method
aggregate_weight
(self)
methods/fedpac.py:62
↓ 1 callers
Method
aggregate_weight
(self)
methods/fedper.py:21
↓ 1 callers
Function
args_parser
()
options.py:5
↓ 1 callers
Function
cifar10
()
data_loader.py:682
↓ 1 callers
Function
cinic10
()
data_loader.py:705
↓ 1 callers
Function
cinic10_cifar
()
data_loader.py:728
↓ 1 callers
Function
emnist
()
data_loader.py:667
↓ 1 callers
Function
flatten
(tensors)
tools.py:207
↓ 1 callers
Function
fmnist
()
data_loader.py:652
↓ 1 callers
Function
get_dataset
Returns train and test datasets and a user group which is a dict where the keys are the user index and the values are the corresponding data for
data_loader.py:792
↓ 1 callers
Function
get_gradient
(model)
tools.py:218
↓ 1 callers
Function
get_head_agg_weight
(num_users, Vars, Hs, *args, **kwargs)
tools.py:94
↓ 1 callers
Function
grad_of
Get the gradient of a given tensor, make it zero if missing. Args: tensor Given instance of/deriving from Tensor Returns: Gradien
tools.py:156
↓ 1 callers
Function
grads_of
Iterate of the gradients of the given tensors, make zero gradients if missing. Args: tensors Generator of/iterable on instances of/deriving
tools.py:173
↓ 1 callers
Function
local_update
(rule)
methods/__init__.py:8
↓ 1 callers
Function
mnist
()
data_loader.py:637
↓ 1 callers
Method
num_flat_features
(self, x)
models/cnn.py:37
↓ 1 callers
Method
num_flat_features
(self, x)
models/cnn.py:69
↓ 1 callers
Function
one_round_training
(rule)
running.py:11
↓ 1 callers
Function
pairwise
Simple generator of the pairs (x, y) in a tuple such that index x < index y. Args: data Indexable (including ability to query length) conta
tools.py:10
↓ 1 callers
Method
prior_label
(self, dataset)
methods/fedpac.py:37
↓ 1 callers
Function
relink
"Relink" the tensors of class (deriving from) Tensor by making them point to another contiguous segment of memory. Args: tensors Generator
tools.py:185
↓ 1 callers
Method
size_label
(self, dataset)
methods/fedpac.py:49
↓ 1 callers
Method
statistics_extraction
(self)
methods/fedpac.py:126
↓ 1 callers
Method
update_base_model
(self, global_weight)
methods/fedpac.py:85
↓ 1 callers
Method
update_global_protos
(self, global_protos)
methods/fedpac.py:101
↓ 1 callers
Method
update_local_classifier
(self, new_weight)
methods/fedpac.py:93
Method
__getitem__
(self, item)
data_loader.py:787
Method
__init__
(self, dataset, index=None)
data_loader.py:780
Method
__init__
(self, idx, args, train_set, test_set, model)
methods/local.py:10
Method
__init__
(self, idx, args, train_set, test_set, model)
methods/fedavg.py:12
Method
__init__
(self, idx, args, train_set, test_set, model)
methods/lg_fedavg.py:10
Method
__init__
(self, idx, args, train_set, test_set, model)
methods/fedpac.py:16
Method
__init__
(self, idx, args, train_set, test_set, model)
methods/fedper.py:10
Method
__init__
(self, num_classes=10)
models/cnn.py:46
Method
__len__
(self)
data_loader.py:784
Function
cifar_noniid
Sample non-I.I.D client data from CIFAR dataset :param dataset: :param num_users: :return:
data_loader.py:263
Function
cinic_separate_noniid
Sample I.I.D. client data from CINIC-10 dataset :param dataset: :param num_users: :return: dict of image index
data_loader.py:442
Method
feature2logit
(self, x)
models/cnn.py:34
Method
feature2logit
(self, x)
models/cnn.py:66
Method
forward
(self, x)
models/cnn.py:25
Method
forward
(self, x)
models/cnn.py:58
Function
get_gradient_values
(model)
tools.py:226
Function
get_parameter_values
(model)
tools.py:236
Function
get_protos
Returns the average of the feature embeddings of samples from per-class.
tools.py:23
Method
local_fine_tuning
(self, local_epoch, round=0)
methods/fedavg.py:96
Method
local_fine_tuning
(self, local_epoch, round=0)
methods/fedper.py:94
Method
local_training
(self, local_epoch)
methods/local.py:34
Method
local_training
(self, local_epoch)
methods/lg_fedavg.py:50
Method
local_training
(self, local_epoch, round=0)
methods/fedpac.py:162
Method
local_training
(self, local_epoch, round=0)
methods/fedper.py:49
Function
mnist_noniid
Sample non-I.I.D client data from MNIST dataset :param dataset: :param num_users: :return:
data_loader.py:35
Function
protos_aggregation
(local_protos_list, local_sizes_list)
tools.py:37
Function
set_gradient
(model, gradient)
tools.py:222
Function
set_gradient_values
(model, gradient)
tools.py:230
Function
set_parameter_values
(model, parameter)
tools.py:240
Function
train_round_fedavg
(args, global_model, local_clients, rnd, **kwargs)
running.py:54
Function
train_round_fedpac
(args, global_model, local_clients, rnd, **kwargs)
running.py:176
Function
train_round_fedper
(args, global_model, local_clients, rnd, **kwargs)
running.py:136
Function
train_round_lgfedavg
(args, global_model, local_clients, rnd, **kwargs)
running.py:95
Function
train_round_standalone
(args, global_model, local_clients, rnd, **kwargs)
running.py:23
Method
update_local_model
(self, global_weight)
methods/lg_fedavg.py:42
Method
update_local_model
(self, global_weight)
methods/fedper.py:41