Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/corenel/pytorch-adda
/ functions
Functions
26 in github.com/corenel/pytorch-adda
⨍
Functions
26
◇
Types & classes
4
↓ 11 callers
Function
make_variable
Convert Tensor to Variable.
utils.py:14
↓ 4 callers
Function
get_data_loader
Get data loader by name.
utils.py:58
↓ 4 callers
Function
init_model
Init models with cuda and weights.
utils.py:66
↓ 4 callers
Function
save_model
Save trained model.
utils.py:85
↓ 2 callers
Function
eval_src
Evaluate classifier for source domain.
core/pretrain.py:74
↓ 2 callers
Function
eval_tgt
Evaluation for target encoder by source classifier on target dataset.
core/test.py:9
↓ 1 callers
Method
__init__
Init LeNet encoder.
models/lenet.py:10
↓ 1 callers
Method
_check_exists
Check if dataset is download and in right place.
datasets/usps.py:83
↓ 1 callers
Method
download
Download dataset.
datasets/usps.py:87
↓ 1 callers
Function
get_mnist
Get MNIST dataset loader.
datasets/mnist.py:10
↓ 1 callers
Function
get_usps
Get USPS dataset loader.
datasets/usps.py:117
↓ 1 callers
Function
init_random_seed
Init random seed.
utils.py:44
↓ 1 callers
Method
load_samples
Load sample images from dataset.
datasets/usps.py:100
↓ 1 callers
Function
train_src
Train classifier for source domain.
core/pretrain.py:10
↓ 1 callers
Function
train_tgt
Train encoder for target domain.
core/adapt.py:13
Method
__getitem__
Get images and target for data loader. Args: index (int): Index Returns: tuple: (image, target) where target
datasets/usps.py:64
Method
__init__
Init USPS dataset.
datasets/usps.py:36
Method
__init__
Init LeNet encoder.
models/lenet.py:43
Method
__init__
Init discriminator.
models/discriminator.py:9
Method
__len__
Return size of dataset.
datasets/usps.py:79
Function
denormalize
Invert normalization, and then convert array into image.
utils.py:28
Method
forward
Forward the LeNet.
models/lenet.py:33
Method
forward
Forward the LeNet classifier.
models/lenet.py:48
Method
forward
Forward the discriminator.
models/discriminator.py:24
Function
init_weights
Init weights for layers w.r.t. the original paper.
utils.py:34
Function
make_cuda
Use CUDA if it's available.
utils.py:21