MCPcopy Create free account

hub / github.com/Kim-Minseon/RoCL / functions

Functions97 in github.com/Kim-Minseon/RoCL

↓ 8 callersFunctioncheckpoint
(model, acc, epoch, args, optimizer, save_name_add='')
src/utils.py:166
↓ 7 callersFunctionprint_status
(string)
src/linear_eval.py:40
↓ 7 callersFunctionprint_status
(string)
src/rocl_train.py:27
↓ 6 callersFunctionprint_status
(string)
src/robustness_test.py:24
↓ 6 callersMethodstep
(self, epoch=None, metrics=None)
src/warmup_scheduler/scheduler.py:53
↓ 5 callersFunctioncheck_integrity
(fpath, md5=None)
src/data/utils.py:38
↓ 5 callersFunctionconv3x3
(in_planes, out_planes, stride=1)
src/models/resnet.py:14
↓ 5 callersFunctionprogress_bar
(current, total, msg=None)
src/utils.py:91
↓ 4 callersFunctionNT_xent
Compute NT_xent loss input: pairwise-similarity matrix return: NT xent loss
src/loss.py:59
↓ 4 callersMethod__init__
(self, block, num_blocks, num_classes=10, contrastive_learning=True)
src/models/resnet.py:127
↓ 4 callersMethod_make_layer
(self, block, planes, num_blocks, stride)
src/models/resnet.py:144
↓ 4 callersFunctionpairwise_similarity
Compute pairwise similarity and return the matrix input: aggregated outputs & temperature for scaling return: pairwise cosine
src/loss.py:5
↓ 3 callersMethodupdate
(self, val, n=1)
src/utils.py:32
↓ 2 callersMethod__repr__
(self)
src/data/vision.py:34
↓ 2 callersMethod_check_integrity
(self)
src/data/cifar.py:161
↓ 2 callersMethod_format_transform_repr
(self, transform, head)
src/data/vision.py:66
↓ 2 callersFunctionadjust_lr
(epoch, optim)
src/linear_eval.py:256
↓ 2 callersFunctionformat_time
(seconds)
src/utils.py:134
↓ 2 callersFunctiongen_bar_updater
()
src/data/utils.py:14
↓ 2 callersFunctionlinear_train
(epoch, model, Linear, projector, loptim, attacker=None)
src/linear_eval.py:147
↓ 2 callersFunctionload
(args, epoch)
src/linear_eval.py:74
↓ 2 callersFunctionmakedir_exist_ok
Python2 support for os.makedirs(.., exist_ok=True)
src/data/utils.py:46
↓ 2 callersMethodperturb
(self, original_images, labels, reduction4loss='mean', random_start=True)
src/attack_lib.py:50
↓ 2 callersFunctionprint_args
(args)
src/argument.py:151
↓ 2 callersFunctionproject
(x, original_x, epsilon, _type='linf')
src/attack_lib.py:15
↓ 2 callersFunctiontest
(model, Linear)
src/linear_eval.py:225
↓ 1 callersFunctionResNet18
(num_classes, contrastive_learning)
src/models/resnet.py:184
↓ 1 callersFunctionResNet50
(num_classes,contrastive_learning)
src/models/resnet.py:190
↓ 1 callersMethod__len__
(self)
src/data/vision.py:31
↓ 1 callersFunction_get_confirm_token
(response)
src/data/utils.py:180
↓ 1 callersFunction_is_gzip
(filename)
src/data/utils.py:216
↓ 1 callersFunction_is_tar
(filename)
src/data/utils.py:204
↓ 1 callersFunction_is_targz
(filename)
src/data/utils.py:208
↓ 1 callersFunction_is_tarxz
(filename)
src/data/utils.py:200
↓ 1 callersFunction_is_tgz
(filename)
src/data/utils.py:212
↓ 1 callersFunction_is_zip
(filename)
src/data/utils.py:220
↓ 1 callersMethod_load_meta
(self)
src/data/cifar.py:96
↓ 1 callersFunction_save_response_content
(response, destination, chunk_size=32768)
src/data/utils.py:188
↓ 1 callersFunctioncalculate_md5
(fpath, chunk_size=1024 * 1024)
src/data/utils.py:26
↓ 1 callersFunctioncheck_md5
(fpath, md5, **kwargs)
src/data/utils.py:34
↓ 1 callersMethoddownload
(self)
src/data/cifar.py:170
↓ 1 callersFunctiondownload_and_extract_archive
(url, download_root, extract_root=None, filename=None, md5=None, remove_finis
src/data/utils.py:252
↓ 1 callersFunctiondownload_url
Download a file from a url and place it in root. Args: url (str): URL to download file from root (str): Directory to place downloa
src/data/utils.py:59
↓ 1 callersMethodextra_repr
(self)
src/data/vision.py:50
↓ 1 callersFunctionextract_archive
(from_path, to_path=None, remove_finished=False)
src/data/utils.py:224
↓ 1 callersMethodget_loss
(self, original_images, target, optimizer, weight, random_start=True)
src/attack_lib.py:120
↓ 1 callersFunctioniterable_to_str
(iterable)
src/data/utils.py:267
↓ 1 callersFunctionlinear_parser
()
src/argument.py:37
↓ 1 callersFunctionparser
()
src/argument.py:94
↓ 1 callersMethodreset
(self)
src/utils.py:26
↓ 1 callersMethodstep_ReduceLROnPlateau
(self, metrics, epoch=None)
src/warmup_scheduler/scheduler.py:39
↓ 1 callersFunctiontest
(attacker)
src/robustness_test.py:99
↓ 1 callersFunctiontest
(epoch, train_loss)
src/rocl_train.py:179
↓ 1 callersFunctiontest_parser
()
src/argument.py:3
↓ 1 callersFunctiontrain
(epoch)
src/rocl_train.py:118
FunctionResNet34
(num_classes,contrastive_learning)
src/models/resnet.py:187
Method__call__
(self, input, target)
src/data/vision.py:59
Method__getitem__
(self, index)
src/data/vision.py:28
Method__getitem__
Args: index (int): Index Returns: tuple: (image, target) where target is index of the target class.
src/data/cifar.py:109
Method__init__
(self, model, linear, epsilon, alpha, min_val, max_val, max_iters, _type='linf')
src/attack_lib.py:32
Method__init__
(self, model, projector, epsilon, alpha, min_val, max_val, max_iters, _type='linf', loss_type='sim', regulari
src/attack_lib.py:98
Method__init__
(self)
src/utils.py:23
Method__init__
(self, dataset='cifar-10')
src/utils.py:195
Method__init__
(self, optimizer, multiplier, total_epoch, after_scheduler=None)
src/warmup_scheduler/scheduler.py:16
Method__init__
(self, root, transforms=None, transform=None, target_transform=None)
src/data/vision.py:9
Method__init__
(self, transform=None, target_transform=None)
src/data/vision.py:55
Method__init__
(self, root, train=True, transform=None, target_transform=None, download=False, contrastive_l
src/data/cifar.py:53
Method__init__
(self, expansion=0)
src/models/projector.py:6
Method__init__
(self, in_planes, planes, stride=1)
src/models/resnet.py:21
Method__init__
(self, in_planes, planes, stride=1)
src/models/resnet.py:47
Method__init__
(self, in_planes, planes, stride=1)
src/models/resnet.py:72
Method__init__
(self, in_planes, planes, stride=1)
src/models/resnet.py:101
Method__len__
(self)
src/data/cifar.py:158
Method__repr__
(self)
src/data/vision.py:71
Method_format_transform_repr
(self, transform, head)
src/data/vision.py:45
Functionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
src/utils.py:39
Functionbar_update
(count, block_size, total_size)
src/data/utils.py:17
Methodclass2label
(self, _class)
src/utils.py:208
Functiondownload_file_from_google_drive
Download a Google Drive file from and place it in root. Args: file_id (str): id of file to be downloaded root (str): Directory to
src/data/utils.py:146
Methodextra_repr
(self)
src/data/cifar.py:176
Methodforward
(self, x)
src/models/projector.py:12
Methodforward
(self, x)
src/models/resnet.py:35
Methodforward
(self, x)
src/models/resnet.py:60
Methodforward
(self, x)
src/models/resnet.py:88
Methodforward
(self, x)
src/models/resnet.py:116
Methodforward
(self, x, internal_outputs=False)
src/models/resnet.py:152
Functionget_dataset
(args)
src/data_loader.py:5
Functionget_highest_incorrect_predict
(outputs,targets)
src/utils.py:213
Methodget_lr
(self)
src/warmup_scheduler/scheduler.py:25
Functionget_mean_and_std
Compute the mean and std value of dataset.
src/utils.py:55
Functionget_model
(args)
src/model_loader.py:2
Functioninit_params
Init layer parameters.
src/utils.py:69
Methodlabel2class
(self, label)
src/utils.py:204
Functionlearning_rate_warmup
Learning rate warmup for first 10 epoch
src/utils.py:184
Functionlist_dir
List all directories at a given root Args: root (str): Path to directory whose folders need to be listed prefix (bool, optional):
src/data/utils.py:102
Functionlist_files
List all files ending with a suffix at a given root Args: root (str): Path to directory whose folders need to be listed suffix (st
src/data/utils.py:123
Functionverify_str_arg
(value, arg=None, valid_values=None, custom_msg=None)
src/data/utils.py:271