Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KaiyangZhou/pytorch-center-loss
/ functions
Functions
24 in github.com/KaiyangZhou/pytorch-center-loss
⨍
Functions
24
◇
Types & classes
6
↓ 3 callers
Method
close
(self)
utils.py:76
↓ 3 callers
Method
update
(self, val, n=1)
utils.py:31
↓ 2 callers
Function
mkdir_if_missing
(directory)
utils.py:9
↓ 2 callers
Function
plot_features
Plot features on 2D plane. Args: features: (num_instances, num_features). labels: (num_instances).
main.py:185
↓ 1 callers
Function
main
()
main.py:48
↓ 1 callers
Method
reset
(self)
utils.py:25
↓ 1 callers
Function
test
(model, testloader, use_gpu, num_classes, epoch)
main.py:153
↓ 1 callers
Function
train
(model, criterion_xent, criterion_cent, optimizer_model, optimizer_centloss, trainloader,
main.py:104
Method
__call__
(self, img)
transforms.py:8
Method
__del__
(self)
utils.py:56
Method
__enter__
(self)
utils.py:59
Method
__exit__
(self, *args)
utils.py:62
Method
__init__
(self, num_classes=10, feat_dim=2, use_gpu=True)
center_loss.py:14
Method
__init__
(self)
utils.py:22
Method
__init__
(self, fpath=None)
utils.py:49
Method
__init__
(self, num_classes)
models.py:9
Method
__init__
(self, batch_size, use_gpu, num_workers)
datasets.py:8
Function
create
(name, num_classes)
models.py:53
Function
create
(name, batch_size, use_gpu, num_workers)
datasets.py:38
Method
flush
(self)
utils.py:70
Method
forward
Args: x: feature matrix with shape (batch_size, feat_dim). labels: ground truth labels with shape (batch_size).
center_loss.py:25
Method
forward
(self, x)
models.py:30
Function
save_checkpoint
(state, is_best, fpath='checkpoint.pth.tar')
utils.py:37
Method
write
(self, msg)
utils.py:65