Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Huage001/AdaAttN
/ functions
Functions
138 in github.com/Huage001/AdaAttN
⨍
Functions
138
◇
Types & classes
23
↳
Endpoints
1
↓ 9 callers
Method
save
save the current content to the HMTL file
util/html.py:68
↓ 8 callers
Method
eval
Make models eval mode during test time
models/base_model.py:91
↓ 8 callers
Method
get_key
(feats, last_layer_idx, need_shallow=True)
models/adaattn_model.py:141
↓ 6 callers
Function
get_key
(feats, last_layer_idx)
user_specify_demo.py:45
↓ 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:91
↓ 4 callers
Function
mean_variance_norm
(feat)
inference_frame.py:32
↓ 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
Function
create_dataset
(opt, sampler=None)
data/__init__.py:83
↓ 3 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
↓ 3 callers
Method
encode_with_intermediate
(self, input_img)
models/adaattn_model.py:133
↓ 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
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:130
↓ 3 callers
Function
make_dataset
(dir, max_dataset_size=float("inf"))
data/image_folder.py:23
↓ 3 callers
Function
mean_variance_norm
(feat)
user_specify_demo.py:38
↓ 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:153
↓ 3 callers
Method
set_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 callers
Method
__init__
(self)
user_specify_demo.py:130
↓ 2 callers
Method
__init__
(self)
inference_frame.py:125
↓ 2 callers
Method
__init__
(self, in_planes, max_sample=256 * 256, key_planes=None)
models/networks.py:113
↓ 2 callers
Method
__patch_instance_norm_state_dict
Fix InstanceNorm checkpoints incompatibility (prior to 0.4)
models/base_model.py:171
↓ 2 callers
Method
_print
(self, text)
util/get_data.py:35
↓ 2 callers
Function
clean_folder
(folder)
predict.py:75
↓ 2 callers
Function
encode_with_intermediate
(img)
user_specify_demo.py:261
↓ 2 callers
Function
encode_with_intermediate
(img)
inference_frame.py:249
↓ 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
forward
Run forward pass; called by both functions <optimize_parameters> and <test>.
models/base_model.py:69
↓ 2 callers
Function
get_key
(feats)
inference_frame.py:159
↓ 2 callers
Function
get_transform
(opt, params=None, grayscale=False, method=Image.BICUBIC)
data/base_dataset.py:76
↓ 2 callers
Method
initialize
Define the common options that are used in both training and test.
options/base_options.py:20
↓ 2 callers
Function
mkdir
create a single empty directory if it didn't exist Parameters: path (str) -- a single directory path
util/util.py:91
↓ 2 callers
Method
parse
Parse our options, create checkpoints directory suffix, and set up gpu device.
options/base_options.py:116
↓ 2 callers
Function
read_img
(path, h, w)
user_specify_demo.py:15
↓ 2 callers
Function
read_img
(path, h, w)
inference_frame.py:9
↓ 2 callers
Method
setup
(self)
predict.py:15
↓ 2 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
Function
__crop
(img, pos, size)
data/base_dataset.py:125
↓ 1 callers
Function
__flip
(img, flip)
data/base_dataset.py:134
↓ 1 callers
Function
__make_power_2
(img, base, method=Image.BICUBIC)
data/base_dataset.py:105
↓ 1 callers
Function
__print_size_warning
Print warning information about image size(only print once)
data/base_dataset.py:140
↓ 1 callers
Function
__scale_width
(img, target_size, crop_size, method=Image.BICUBIC)
data/base_dataset.py:116
↓ 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
Function
calc_mean_std
(feat, eps=1e-5)
user_specify_demo.py:27
↓ 1 callers
Function
calc_mean_std
(feat, eps=1e-5)
inference_frame.py:21
↓ 1 callers
Function
calc_mean_std
(feat, eps=1e-5)
models/networks.py:93
↓ 1 callers
Method
compute_content_loss
(self, stylized_feats)
models/adaattn_model.py:167
↓ 1 callers
Method
compute_losses
(self)
models/base_model.py:111
↓ 1 callers
Method
compute_losses
(self)
models/adaattn_model.py:211
↓ 1 callers
Method
compute_style_loss
(self, stylized_feats)
models/adaattn_model.py:174
↓ 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:98
↓ 1 callers
Method
forward
(self)
models/adaattn_model.py:152
↓ 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:63
↓ 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:141
↓ 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:114
↓ 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:39
↓ 1 callers
Function
is_image_file
(filename)
data/image_folder.py:19
↓ 1 callers
Method
load_data
(self)
data/__init__.py:68
↓ 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:196
↓ 1 callers
Function
main
()
inference_frame.py:168
↓ 1 callers
Function
mean_variance_norm
(feat)
models/networks.py:104
↓ 1 callers
Method
optimize_parameters
Calculate losses, gradients, and update network weights; called in every training iteration
models/base_model.py:74
↓ 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:179
↓ 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:205
↓ 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:221
↓ 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:91
↓ 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
Function
save_img
(img, path)
user_specify_demo.py:21
↓ 1 callers
Function
save_img
(img, path)
inference_frame.py:15
↓ 1 callers
Method
update_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
Function
default_loader
(path)
data/image_folder.py:35
Function
diagnose_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