MCPcopy Create free account

hub / github.com/ayushkumartarun/zero-shot-unlearning / functions

Functions47 in github.com/ayushkumartarun/zero-shot-unlearning

↓ 8 callersMethod__init__
(self, in_channels, out_channels, kernel_size=3, stride=1, padding=None, output_padding=0, ac
models.py:41
↓ 8 callersFunctionevaluate
(model, val_loader, device='cuda')
utils.py:37
↓ 3 callersFunctioncollect_prob
(data_loader, model)
metrics.py:6
↓ 3 callersFunctionentropy
(p, dim = -1, keepdim = False)
metrics.py:3
↓ 2 callersFunctionattention
Taken from https://github.com/szagoruyko/attention-transfer :param x = activations
unlearn.py:9
↓ 2 callersFunctiondivergence
(student_logits, teacher_logits, KL_temperature)
unlearn.py:26
↓ 2 callersFunctionrelearn_time
(model, train_loader, valid_loader, reqAcc, lr)
metrics.py:37
↓ 2 callersFunctiontraining_step
(model, batch, device)
utils.py:10
↓ 1 callersMethod__init__
(self, z_dim, num_channels = 3)
unlearn.py:56
↓ 1 callersFunctionaccuracy
(outputs, labels)
utils.py:6
↓ 1 callersFunctionattention_diff
Taken from https://github.com/szagoruyko/attention-transfer :param x = activations :param y = activations
unlearn.py:17
↓ 1 callersFunctionepoch_end
(model, epoch, result)
utils.py:32
↓ 1 callersFunctionget_lr
(optimizer)
utils.py:42
↓ 1 callersFunctionget_membership_attack_data
(retain_loader, forget_loader, test_loader, model)
metrics.py:17
↓ 1 callersMethodreset_parameters
(self)
models.py:32
↓ 1 callersFunctionvalidation_epoch_end
(model, outputs)
utils.py:25
↓ 1 callersFunctionvalidation_step
(model, batch, device)
utils.py:17
FunctionKT_loss_generator
(student_logits, teacher_logits, KL_temperature)
unlearn.py:32
FunctionKT_loss_student
(student_logits, student_activations, teacher_logits, teacher_activations, KL_temperature = 1, AT_beta = 250)
unlearn.py:40
Method__init__
(self)
models.py:7
Method__init__
(self)
models.py:14
Method__init__
(self, in_channels, out_channels, kernel_size=3, stride=1, padding=None, output_padding=0, w_sig =\
models.py:21
Method__init__
(self, filters_percentage=1., n_channels=3, num_classes=10, dropout=False, batch_norm=True)
models.py:60
Method__init__
(self, size)
models.py:128
Method__init__
(self, n_classes)
models.py:137
Method__init__
(self, in_channels, out_channels, kernel_size, padding, stride)
models.py:172
Method__init__
(self)
models.py:211
Method__init__
Infinite loader, which contains a learnable generator.
unlearn.py:100
Method__iter__
(self)
unlearn.py:139
Method__next__
(self)
unlearn.py:115
Functionain
(full_model, model, gold_model, train_data, val_retain, val_forget, batch_size = 256, error
metrics.py:68
Functioncifar10
(root = './')
datasets.py:9
Functionfit_one_cycle
(epochs, max_lr, model, train_loader, val_loader, weight_decay=0, grad_clip=None, opt_func=
utils.py:46
Methodforward
(self, x)
models.py:10
Methodforward
(self,x)
models.py:16
Methodforward
(self, input)
models.py:37
Methodforward
(self, x)
models.py:89
Methodforward
(self, tensor)
models.py:132
Methodforward
(self, x, true_labels=None)
models.py:156
Methodforward
(self, x)
models.py:193
Methodforward
(self, x)
models.py:237
Methodforward
(self, z)
unlearn.py:86
Functionget_membership_attack_prob
(retain_loader, forget_loader, test_loader, model)
metrics.py:29
Functionmnist
(root = './')
datasets.py:43
Methodprint_shape
For debugging purposes
unlearn.py:89
Methodsamples
:return: if grid returns single grid image, else returns n images.
unlearn.py:124
Functionsvhn
(root = './')
datasets.py:32