Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/VSAnimator/stgan
/ functions
Functions
228 in github.com/VSAnimator/stgan
⨍
Functions
228
◇
Types & classes
49
↓ 15 callers
Method
backward
Calculate losses, gradients, and update network weights; called in every training iteration
models/template_model.py:87
↓ 14 callers
Method
__init__
Initialize the GANLoss class. Parameters: gan_mode (str) - - the type of GAN objective. It currently supports vanilla, lsgan, an
models/networks_branched.py:213
↓ 14 callers
Method
set_requires_grad
Set requies_grad=Fasle for all the networks to avoid unnecessary computations Parameters: nets (network list) -- a list of netwo
models/base_model.py:214
↓ 12 callers
Function
get_transform
(opt, params=None, grayscale=False, method=Image.BICUBIC, convert=True)
data/base_dataset.py:81
↓ 8 callers
Function
make_dataset
(dir, max_dataset_size=float("inf"))
data/image_folder.py:23
↓ 6 callers
Method
__init__
Initialize the GANLoss class. Parameters: gan_mode (str) - - the type of GAN objective. It currently supports vanilla, lsgan, an
models/networks.py:209
↓ 6 callers
Method
save
save the current content to the HMTL file
util/html.py:68
↓ 4 callers
Method
create_visdom_connections
If the program could not connect to Visdom server, this function will start a new server at port < self.port >
util/visualizer.py:97
↓ 4 callers
Function
get_params
(opt, size)
data/base_dataset.py:63
↓ 3 callers
Method
add_header
Insert a header to the HTML file Parameters: text (str) -- the header text
util/html.py:39
↓ 3 callers
Method
add_images
add images to the HTML file Parameters: ims (str list) -- a list of image paths txts (str list) -- a list of image
util/html.py:48
↓ 3 callers
Method
get
Download a dataset. Parameters: save_path (str) -- A directory to save the data to. dataset (str) -- (opt
util/get_data.py:79
↓ 3 callers
Method
save_networks
Save all the networks to the disk. Parameters: epoch (int) -- current epoch; used in the file name '%s_net_%s.pth' % (epoch, name
models/base_model.py:139
↓ 2 callers
Method
_print
(self, text)
util/get_data.py:35
↓ 2 callers
Method
backward_D_basic
Calculate GAN loss for the discriminator Parameters: netD (network) -- the discriminator D real (tensor array) -
models/cycle_gan_model.py:119
↓ 2 callers
Method
compute_visuals
Calculate additional output images for visdom and HTML visualization
models/base_model.py:108
↓ 2 callers
Function
create_dataset
Create a dataset given the option. This function wraps the class CustomDatasetDataLoader. This is the main interface between this package
data/__init__.py:47
↓ 2 callers
Function
create_model
Create a model given the option. This function warps the class CustomDatasetDataLoader. This is the main interface between this package and '
models/__init__.py:54
↓ 2 callers
Function
find_dataset_using_name
Import the module "data/[dataset_name]_dataset.py". In the file, the class called DatasetNameDataset() will be instantiated. It has to be a s
data/__init__.py:18
↓ 2 callers
Function
find_model_using_name
Import the module "models/[model_name]_model.py". In the file, the class called DatasetNameModel() will be instantiated. It has to be a subcl
models/__init__.py:25
↓ 2 callers
Method
get_current_visuals
Return visualization images. train.py will display these images with visdom, and save the images to a HTML
models/base_model.py:123
↓ 2 callers
Function
get_norm_layer
Return a normalization layer Parameters: norm_type (str) -- the name of the normalization layer: batch | instance | none For BatchNo
models/networks.py:11
↓ 2 callers
Function
get_norm_layer
Return a normalization layer Parameters: norm_type (str) -- the name of the normalization layer: batch | instance | none For BatchNo
models/networks_branched.py:11
↓ 2 callers
Function
init_net
Initialize a network: 1. register CPU/GPU device (with multi-GPU support); 2. initialize the network weights Parameters: net (network)
models/networks.py:94
↓ 2 callers
Function
init_net
Initialize a network: 1. register CPU/GPU device (with multi-GPU support); 2. initialize the network weights Parameters: net (network)
models/networks_branched.py:94
↓ 2 callers
Function
mkdir
create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
util/util.py:89
↓ 2 callers
Method
parse
Parse our options, create checkpoints directory suffix, and set up gpu device.
options/base_options.py:113
↓ 2 callers
Method
query
Return an image from the pool. Parameters: images: the latest generated images from the generator Returns images from th
util/image_pool.py:23
↓ 2 callers
Method
set_input
Unpack input data from the dataloader and perform necessary pre-processing steps. Parameters: input: a dictionary that contains t
models/test_model.py:52
↓ 2 callers
Method
setup
Load and print networks; create schedulers Parameters: opt (Option class) -- stores all the experiment flags; needs to be a subcl
models/base_model.py:78
↓ 1 callers
Function
__crop
(img, pos, size)
data/base_dataset.py:133
↓ 1 callers
Function
__flip
(img, flip)
data/base_dataset.py:142
↓ 1 callers
Function
__make_power_2
(img, base, method=Image.BICUBIC)
data/base_dataset.py:113
↓ 1 callers
Method
__patch_instance_norm_state_dict
Fix InstanceNorm checkpoints incompatibility (prior to 0.4)
models/base_model.py:157
↓ 1 callers
Function
__print_size_warning
Print warning information about image size(only print once)
data/base_dataset.py:148
↓ 1 callers
Function
__scale_width
(img, target_width, method=Image.BICUBIC)
data/base_dataset.py:124
↓ 1 callers
Method
_download_data
(self, dataset_url, save_path)
util/get_data.py:56
↓ 1 callers
Method
_get_options
(r)
util/get_data.py:40
↓ 1 callers
Method
_present_options
(self)
util/get_data.py:46
↓ 1 callers
Method
backward_D
Calculate GAN loss for the discriminator
models/temporal_branched_model.py:101
↓ 1 callers
Method
backward_D
Calculate GAN loss for the discriminator
models/temporal_ir_model.py:102
↓ 1 callers
Method
backward_D
Calculate GAN loss for the discriminator
models/temporal_model.py:102
↓ 1 callers
Method
backward_D
Calculate GAN loss for the discriminator
models/temporal_branched_ir_model.py:101
↓ 1 callers
Method
backward_D
Calculate GAN loss for the discriminator
models/pix2pix_model.py:90
↓ 1 callers
Method
backward_D
Calculate GAN loss for the discriminator
models/pix2pix_ir_model.py:90
↓ 1 callers
Method
backward_D_A
Calculate GAN loss for discriminator D_A
models/cycle_gan_model.py:141
↓ 1 callers
Method
backward_D_B
Calculate GAN loss for discriminator D_B
models/cycle_gan_model.py:146
↓ 1 callers
Method
backward_G
Calculate GAN and L1 loss for the generator
models/temporal_branched_model.py:115
↓ 1 callers
Method
backward_G
Calculate GAN and L1 loss for the generator
models/temporal_ir_model.py:116
↓ 1 callers
Method
backward_G
Calculate GAN and L1 loss for the generator
models/temporal_model.py:116
↓ 1 callers
Method
backward_G
Calculate GAN and L1 loss for the generator
models/temporal_branched_ir_model.py:115
↓ 1 callers
Method
backward_G
Calculate the loss for generators G_A and G_B
models/cycle_gan_model.py:151
↓ 1 callers
Method
backward_G
Calculate GAN and L1 loss for the generator
models/pix2pix_model.py:104
↓ 1 callers
Method
backward_G
Calculate GAN and L1 loss for the generator
models/pix2pix_ir_model.py:104
↓ 1 callers
Method
build_conv_block
Construct a convolutional block. Parameters: dim (int) -- the number of channels in the conv layer. padding
models/networks.py:384
↓ 1 callers
Method
build_conv_block
Construct a convolutional block. Parameters: dim (int) -- the number of channels in the conv layer. padding
models/networks_branched.py:482
↓ 1 callers
Method
display_current_results
Display current results on visdom; save current results to an HTML file. Parameters: visuals (OrderedDict) - - dictionary of imag
util/visualizer.py:104
↓ 1 callers
Method
eval
Make models eval mode during test time
models/base_model.py:91
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/temporal_branched_model.py:96
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/temporal_ir_model.py:98
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/temporal_model.py:98
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/temporal_branched_ir_model.py:96
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/cycle_gan_model.py:112
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/base_model.py:69
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/pix2pix_model.py:86
↓ 1 callers
Method
forward
Run forward pass. This will be called by both functions <optimize_parameters> and <test>.
models/template_model.py:83
↓ 1 callers
Method
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/pix2pix_ir_model.py:86
↓ 1 callers
Method
gather_options
Initialize our parser with basic options(only once). Add additional model-specific and dataset-specific options. These options are def
options/base_options.py:60
↓ 1 callers
Method
get_current_losses
Return traning losses / errors. train.py will print out these errors on console, and save them to a file
models/base_model.py:131
↓ 1 callers
Method
get_image_dir
Return the directory that stores images
util/html.py:35
↓ 1 callers
Method
get_image_paths
Return image paths that are used to load current data
models/base_model.py:112
↓ 1 callers
Method
get_target_tensor
Create label tensors with the same size as the input. Parameters: prediction (tensor) - - tpyically the prediction from a discrim
models/networks.py:233
↓ 1 callers
Method
get_target_tensor
Create label tensors with the same size as the input. Parameters: prediction (tensor) - - tpyically the prediction from a discrim
models/networks_branched.py:237
↓ 1 callers
Function
init_weights
Initialize network weights. Parameters: net (network) -- network to be initialized init_type (str) -- the name of an initializa
models/networks.py:60
↓ 1 callers
Function
init_weights
Initialize network weights. Parameters: net (network) -- network to be initialized init_type (str) -- the name of an initializa
models/networks_branched.py:60
↓ 1 callers
Method
initialize
Define the common options that are used in both training and test.
options/base_options.py:20
↓ 1 callers
Function
is_image_file
(filename)
data/image_folder.py:19
↓ 1 callers
Method
load_data
(self)
data/__init__.py:81
↓ 1 callers
Method
load_networks
Load all the networks from the disk. Parameters: epoch (int) -- current epoch; used in the file name '%s_net_%s.pth' % (epoch, na
models/base_model.py:171
↓ 1 callers
Method
optimize_parameters
No optimization for test model.
models/test_model.py:67
↓ 1 callers
Method
plot_current_losses
display the current losses on visdom display: dictionary of error labels and values Parameters: epoch (int) -- current
util/visualizer.py:185
↓ 1 callers
Method
print_current_losses
print current losses on console; also save the losses to the disk Parameters: epoch (int) -- current epoch iters (int
util/visualizer.py:211
↓ 1 callers
Method
print_networks
Print the total number of parameters in the network and (if verbose) network architecture Parameters: verbose (bool) -- if verbos
models/base_model.py:196
↓ 1 callers
Method
print_options
Print and save options It will print both current options and default values(if different). It will save options into a text file / [
options/base_options.py:88
↓ 1 callers
Method
reset
Reset the self.saved status
util/visualizer.py:93
↓ 1 callers
Function
save_images
Save images to the disk. Parameters: webpage (the HTML class) -- the HTML webpage class that stores these imaegs (see html.py for more de
util/visualizer.py:16
↓ 1 callers
Method
test
Forward function used in test time. This function wraps <forward> function in no_grad() so we don't save intermediate steps for backprop
models/base_model.py:98
↓ 1 callers
Method
update_learning_rate
Update learning rates for all the networks; called at the end of every epoch
models/base_model.py:116
Method
__call__
Calculate loss given Discriminator's output and grount truth labels. Parameters: prediction (tensor) - - tpyically the prediction
models/networks.py:250
Method
__call__
Calculate loss given Discriminator's output and grount truth labels. Parameters: prediction (tensor) - - tpyically the prediction
models/networks_branched.py:254
Method
__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns:
data/base_dataset.py:51
Method
__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns a dic
data/temporal_ir_dataset.py:29
Method
__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns a dic
data/temporal_dataset.py:29
Method
__getitem__
Return a data point and its metadata information. Parameters: index (int) -- a random integer for data indexing Ret
data/unaligned_dataset.py:39
Method
__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns a dic
data/aligned_ir_dataset.py:29
Method
__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns a dic
data/aligned_dataset.py:29
Method
__getitem__
(self, index)
data/image_folder.py:55
Method
__getitem__
Return a data point and its metadata information. Parameters: index -- a random integer for data indexing Returns:
data/template_dataset.py:54
Method
__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns a dic
data/single_dataset.py:23
Method
__init__
Initialize the class; save the options in the class Parameters: opt (Option class)-- stores all the experiment flags; needs to be
data/base_dataset.py:23
next →
1–100 of 228, ranked by callers