MCPcopy Create free account

hub / github.com/HobbitLong/CMC / functions

Functions98 in github.com/HobbitLong/CMC

↓ 42 callersMethodcuda
(self)
NCE/alias_multinomial.py:45
↓ 33 callersMethodupdate
(self, val, n=1)
util.py:31
↓ 8 callersMethod__init__
(self, block, layers, low_dim=128, in_channel=3, width=1)
models/resnet.py:110
↓ 7 callersFunctionresnet50
Constructs a ResNet-50 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
models/resnet.py:207
↓ 6 callersFunctionresnet101
Constructs a ResNet-101 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
models/resnet.py:218
↓ 6 callersFunctionresnet18
Constructs a ResNet-18 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
models/resnet.py:185
↓ 4 callersMethod_make_layer
(self, block, planes, blocks, stride=1)
models/resnet.py:137
↓ 4 callersFunctionadjust_learning_rate
Sets the learning rate to the initial LR decayed by 0.2 every steep step
util.py:7
↓ 3 callersMethod__init__
(self, feat_dim=128)
models/alexnet.py:18
↓ 2 callersMethod__init__
(self, inputSize, outputSize, K, T=0.07, momentum=0.5, use_softmax=False)
NCE/NCEAverage.py:9
↓ 2 callersMethod__init__
(self)
models/LinearModel.py:7
↓ 2 callersFunctionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
eval_moco_ins.py:468
↓ 2 callersFunctionaccuracy
Computes the accuracy over the k top predictions for the specified values of k
util.py:38
↓ 2 callersFunctionconv3x3
3x3 convolution with padding
models/resnet.py:19
↓ 2 callersMethoddraw
Draw N samples from multinomial :param N: number of samples :return: samples
NCE/alias_multinomial.py:49
↓ 2 callersFunctionmoment_update
model_ema = m * model_ema + (1 - m) model
train_moco_ins.py:140
↓ 1 callersMethod__init__
(self, n_data)
NCE/NCECriterion.py:11
↓ 1 callersFunctionget_shuffle_ids
generate shuffle ids for ShuffleBN
train_moco_ins.py:146
↓ 1 callersFunctionget_train_loader
get the train loader
train_CMC.py:127
↓ 1 callersFunctionget_train_val_loader
(args)
LinearProbing.py:114
↓ 1 callersMethodinitilize
(self)
models/LinearModel.py:47
↓ 1 callersMethodinitilize
(self)
models/LinearModel.py:102
↓ 1 callersFunctionmain
()
eval_moco_ins.py:134
↓ 1 callersFunctionmain
()
train_moco_ins.py:155
↓ 1 callersFunctionmain
()
train_CMC.py:270
↓ 1 callersFunctionmain
()
LinearProbing.py:321
↓ 1 callersFunctionparse_option
()
eval_moco_ins.py:31
↓ 1 callersFunctionparse_option
()
train_moco_ins.py:40
↓ 1 callersFunctionparse_option
()
train_CMC.py:37
↓ 1 callersFunctionparse_option
()
LinearProbing.py:27
↓ 1 callersMethodreset
(self)
util.py:25
↓ 1 callersFunctionset_model
(args, n_data)
train_CMC.py:165
↓ 1 callersFunctionset_model
(args)
LinearProbing.py:166
↓ 1 callersFunctionset_optimizer
(args, model)
train_CMC.py:188
↓ 1 callersFunctionset_optimizer
(args, classifier)
LinearProbing.py:200
↓ 1 callersFunctiontrain
one epoch training
eval_moco_ins.py:357
↓ 1 callersFunctiontrain
one epoch training
train_CMC.py:197
↓ 1 callersFunctiontrain
one epoch training
LinearProbing.py:208
↓ 1 callersFunctiontrain_ins
one epoch training for instance discrimination
train_moco_ins.py:336
↓ 1 callersFunctiontrain_moco
one epoch training for instance discrimination
train_moco_ins.py:400
↓ 1 callersFunctionvalidate
(val_loader, model, classifier, criterion, opt)
eval_moco_ins.py:418
↓ 1 callersFunctionvalidate
evaluation
LinearProbing.py:268
Method__call__
(self, img)
dataset.py:41
Method__call__
(self, img)
dataset.py:49
Method__call__
(self, img)
dataset.py:57
Method__call__
(self, img)
dataset.py:65
Method__call__
(self, img)
dataset.py:73
Method__call__
(self, img)
dataset.py:81
Method__call__
(self, img)
dataset.py:89
Method__call__
(self, img)
dataset.py:97
Method__call__
(self, img)
dataset.py:105
Method__call__
(self, img)
dataset.py:113
Method__call__
(self, img)
dataset.py:121
Method__getitem__
Args: index (int): Index Returns: tuple: (image, target, index) where target is class_index of the target cla
dataset.py:18
Method__init__
(self, root, transform=None, target_transform=None, two_crop=False)
dataset.py:14
Method__init__
(self)
util.py:18
Method__init__
(self)
NCE/NCECriterion.py:37
Method__init__
(self, inputSize, outputSize, K, T=0.07, momentum=0.5, use_softmax=False)
NCE/NCEAverage.py:94
Method__init__
(self, inputSize, outputSize, K, T=0.07, use_softmax=False)
NCE/NCEAverage.py:153
Method__init__
(self, probs)
NCE/alias_multinomial.py:8
Method__init__
(self, layer=5, n_label=1000, pool_type='max')
models/LinearModel.py:15
Method__init__
(self, layer=6, n_label=1000, pool_type='avg', width=1)
models/LinearModel.py:58
Method__init__
(self, feat_dim=128)
models/alexnet.py:8
Method__init__
(self, in_channel=1, feat_dim=128)
models/alexnet.py:32
Method__init__
(self, power=2)
models/alexnet.py:109
Method__init__
(self, power=2)
models/resnet.py:27
Method__init__
(self, inplanes, planes, stride=1, downsample=None)
models/resnet.py:40
Method__init__
(self, inplanes, planes, stride=1, downsample=None)
models/resnet.py:72
Method__init__
(self, width=1)
models/resnet.py:242
Method__init__
(self, name='resnet50')
models/resnet.py:252
Method__init__
(self, name='resnet50')
models/resnet.py:274
Method__init__
(self, name='resnet50')
models/resnet.py:296
Method__init__
(self, name='resnet50v1')
models/resnet.py:318
Methodforward
(self, x)
NCE/NCECriterion.py:15
Methodforward
(self, x)
NCE/NCECriterion.py:41
Methodforward
(self, l, ab, y, idx=None)
NCE/NCEAverage.py:23
Methodforward
(self, x, y, idx=None)
NCE/NCEAverage.py:107
Methodforward
(self, q, k)
NCE/NCEAverage.py:167
Methodforward
(self, feat)
models/LinearModel.py:10
Methodforward
(self, x)
models/LinearModel.py:53
Methodforward
(self, x)
models/LinearModel.py:108
Methodforward
(self, x, layer=8)
models/alexnet.py:13
Methodforward
(self, x, layer=8)
models/alexnet.py:24
Methodforward
(self, x, layer)
models/alexnet.py:77
Methodforward
(self, x)
models/alexnet.py:113
Methodforward
(self, x)
models/resnet.py:31
Methodforward
(self, x)
models/resnet.py:50
Methodforward
(self, x)
models/resnet.py:85
Methodforward
(self, x, layer=7)
models/resnet.py:154
Methodforward
(self, x, layer=7)
models/resnet.py:247
Methodforward
(self, x, layer=7)
models/resnet.py:266
Methodforward
(self, x, layer=7)
models/resnet.py:288
Methodforward
(self, x, layer=7)
models/resnet.py:310
Methodforward
(self, x, layer=7)
models/resnet.py:331
Functionresnet152
Constructs a ResNet-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
models/resnet.py:229
Functionresnet34
Constructs a ResNet-34 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
models/resnet.py:196
Functionset_bn_train
(m)
train_moco_ins.py:408
Functionset_lr
set the learning rate
eval_moco_ins.py:349