MCPcopy Create free account

hub / github.com/Huage001/AdaAttN / functions

Functions138 in github.com/Huage001/AdaAttN

↓ 9 callersMethodsave
save the current content to the HMTL file
util/html.py:68
↓ 8 callersMethodeval
Make models eval mode during test time
models/base_model.py:91
↓ 8 callersMethodget_key
(feats, last_layer_idx, need_shallow=True)
models/adaattn_model.py:141
↓ 6 callersFunctionget_key
(feats, last_layer_idx)
user_specify_demo.py:45
↓ 4 callersMethodcreate_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:91
↓ 4 callersFunctionmean_variance_norm
(feat)
inference_frame.py:32
↓ 3 callersMethodadd_header
Insert a header to the HTML file Parameters: text (str) -- the header text
util/html.py:39
↓ 3 callersMethodadd_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 callersFunctioncreate_dataset
(opt, sampler=None)
data/__init__.py:83
↓ 3 callersFunctioncreate_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
↓ 3 callersMethodencode_with_intermediate
(self, input_img)
models/adaattn_model.py:133
↓ 3 callersMethodget
Download a dataset. Parameters: save_path (str) -- A directory to save the data to. dataset (str) -- (opt
util/get_data.py:79
↓ 3 callersMethodget_current_visuals
Return visualization images. train.py will display these images with visdom, and save the images to a HTML
models/base_model.py:130
↓ 3 callersFunctionmake_dataset
(dir, max_dataset_size=float("inf"))
data/image_folder.py:23
↓ 3 callersFunctionmean_variance_norm
(feat)
user_specify_demo.py:38
↓ 3 callersMethodsave_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:153
↓ 3 callersMethodset_input
Unpack input data from the dataloader and perform necessary pre-processing steps. Parameters: input (dict): includes the data its
models/base_model.py:60
↓ 2 callersMethod__init__
(self)
user_specify_demo.py:130
↓ 2 callersMethod__init__
(self)
inference_frame.py:125
↓ 2 callersMethod__init__
(self, in_planes, max_sample=256 * 256, key_planes=None)
models/networks.py:113
↓ 2 callersMethod__patch_instance_norm_state_dict
Fix InstanceNorm checkpoints incompatibility (prior to 0.4)
models/base_model.py:171
↓ 2 callersMethod_print
(self, text)
util/get_data.py:35
↓ 2 callersFunctionclean_folder
(folder)
predict.py:75
↓ 2 callersFunctionencode_with_intermediate
(img)
user_specify_demo.py:261
↓ 2 callersFunctionencode_with_intermediate
(img)
inference_frame.py:249
↓ 2 callersFunctionfind_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 callersFunctionfind_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 callersMethodforward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/base_model.py:69
↓ 2 callersFunctionget_key
(feats)
inference_frame.py:159
↓ 2 callersFunctionget_transform
(opt, params=None, grayscale=False, method=Image.BICUBIC)
data/base_dataset.py:76
↓ 2 callersMethodinitialize
Define the common options that are used in both training and test.
options/base_options.py:20
↓ 2 callersFunctionmkdir
create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
util/util.py:91
↓ 2 callersMethodparse
Parse our options, create checkpoints directory suffix, and set up gpu device.
options/base_options.py:116
↓ 2 callersFunctionread_img
(path, h, w)
user_specify_demo.py:15
↓ 2 callersFunctionread_img
(path, h, w)
inference_frame.py:9
↓ 2 callersMethodsetup
(self)
predict.py:15
↓ 2 callersMethodtest
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 callersFunction__crop
(img, pos, size)
data/base_dataset.py:125
↓ 1 callersFunction__flip
(img, flip)
data/base_dataset.py:134
↓ 1 callersFunction__make_power_2
(img, base, method=Image.BICUBIC)
data/base_dataset.py:105
↓ 1 callersFunction__print_size_warning
Print warning information about image size(only print once)
data/base_dataset.py:140
↓ 1 callersFunction__scale_width
(img, target_size, crop_size, method=Image.BICUBIC)
data/base_dataset.py:116
↓ 1 callersMethod_download_data
(self, dataset_url, save_path)
util/get_data.py:56
↓ 1 callersMethod_get_options
(r)
util/get_data.py:40
↓ 1 callersMethod_present_options
(self)
util/get_data.py:46
↓ 1 callersFunctioncalc_mean_std
(feat, eps=1e-5)
user_specify_demo.py:27
↓ 1 callersFunctioncalc_mean_std
(feat, eps=1e-5)
inference_frame.py:21
↓ 1 callersFunctioncalc_mean_std
(feat, eps=1e-5)
models/networks.py:93
↓ 1 callersMethodcompute_content_loss
(self, stylized_feats)
models/adaattn_model.py:167
↓ 1 callersMethodcompute_losses
(self)
models/base_model.py:111
↓ 1 callersMethodcompute_losses
(self)
models/adaattn_model.py:211
↓ 1 callersMethodcompute_style_loss
(self, stylized_feats)
models/adaattn_model.py:174
↓ 1 callersMethoddisplay_current_results
Display current results on visdom; save current results to an HTML file. Parameters: visuals (OrderedDict) - - dictionary of imag
util/visualizer.py:98
↓ 1 callersMethodforward
(self)
models/adaattn_model.py:152
↓ 1 callersMethodgather_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:63
↓ 1 callersMethodget_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:141
↓ 1 callersMethodget_image_dir
Return the directory that stores images
util/html.py:35
↓ 1 callersMethodget_image_paths
Return image paths that are used to load current data
models/base_model.py:114
↓ 1 callersFunctioninit_weights
Initialize network weights. Parameters: net (network) -- network to be initialized init_type (str) -- the name of an initializa
models/networks.py:39
↓ 1 callersFunctionis_image_file
(filename)
data/image_folder.py:19
↓ 1 callersMethodload_data
(self)
data/__init__.py:68
↓ 1 callersMethodload_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:196
↓ 1 callersFunctionmain
()
inference_frame.py:168
↓ 1 callersFunctionmean_variance_norm
(feat)
models/networks.py:104
↓ 1 callersMethodoptimize_parameters
Calculate losses, gradients, and update network weights; called in every training iteration
models/base_model.py:74
↓ 1 callersMethodplot_current_losses
display the current losses on visdom display: dictionary of error labels and values Parameters: epoch (int) -- current
util/visualizer.py:179
↓ 1 callersMethodprint_current_losses
print current losses on console; also save the losses to the disk Parameters: epoch (int) -- current epoch iters (int
util/visualizer.py:205
↓ 1 callersMethodprint_networks
Print the total number of parameters in the network and (if verbose) network architecture Parameters: verbose (bool) -- if verbos
models/base_model.py:221
↓ 1 callersMethodprint_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:91
↓ 1 callersFunctionsave_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 callersFunctionsave_img
(img, path)
user_specify_demo.py:21
↓ 1 callersFunctionsave_img
(img, path)
inference_frame.py:15
↓ 1 callersMethodupdate_learning_rate
Update learning rates for all the networks; called at the end of every epoch
models/base_model.py:118
Method__getitem__
Return a data point and its metadata information. Parameters: index - - a random integer for data indexing Returns:
data/base_dataset.py:46
Method__getitem__
(self, index)
data/unaligned_dataset.py:27
Method__getitem__
(self, index)
data/image_folder.py:54
Method__init__
(self, in_planes, max_sample=256 * 256, key_planes=None)
user_specify_demo.py:56
Method__init__
(self, in_planes, key_planes=None)
user_specify_demo.py:111
Method__init__
(self, in_planes, max_sample=256 * 256, key_planes=None)
inference_frame.py:41
Method__init__
(self, in_planes, max_sample=256 * 256, key_planes=None)
inference_frame.py:82
Method__init__
(self, opt)
data/base_dataset.py:24
Method__init__
(self, opt, sampler=None)
data/__init__.py:49
Method__init__
(self, opt)
data/unaligned_dataset.py:16
Method__init__
(self, root, transform=None, return_paths=False, loader=default_loader)
data/image_folder.py:41
Method__init__
Reset the class; indicates the class hasn't been initailized
options/base_options.py:16
Method__init__
Initialize the BaseModel class. Parameters: opt (Option class)-- stores all the experiment flags; needs to be a subclass of BaseO
models/base_model.py:18
Method__init__
(self, opt)
models/adaattn_model.py:24
Method__init__
(self, in_planes, key_planes=None, shallow_layer=False)
models/networks.py:154
Method__init__
(self, skip_connection_3=False)
models/networks.py:172
Method__init__
(self, technique='cyclegan', verbose=True)
util/get_data.py:27
Method__init__
Initialize the HTML classes Parameters: web_dir (str) -- a directory that stores the webpage. HTML file will be created at <web_d
util/html.py:14
Method__init__
Initialize the Visualizer class Parameters: opt -- stores all the experiment flags; needs to be a subclass of BaseOptions
util/visualizer.py:52
Method__init__
Initialize the ImagePool class Parameters: pool_size (int) -- the size of image buffer, if pool_size=0, no buffer will be created
util/image_pool.py:12
Method__iter__
Return a batch of data
data/__init__.py:75
Method__len__
Return the total number of images in the dataset.
data/base_dataset.py:41
Method__len__
Return the number of data in the dataset
data/__init__.py:71
Method__len__
(self)
data/unaligned_dataset.py:49
Method__len__
(self)
data/image_folder.py:64
Functiondefault_loader
(path)
data/image_folder.py:35
Functiondiagnose_network
Calculate and print the mean of average absolute(gradients) Parameters: net (torch network) -- Torch network name (str) -- the na
util/util.py:30
next →1–100 of 138, ranked by callers