MCPcopy Create free account

hub / github.com/NVlabs/imaginaire / types & classes

Types & classes229 in github.com/NVlabs/imaginaire

↓ 48 callersClassConv2dBlock
r"""A Wrapper class that wraps ``torch.nn.Conv2d`` with normalization and nonlinearity. Args: in_channels (int): Number of channels i
imaginaire/layers/conv.py:556
↓ 25 callersClassLinearBlock
r"""A Wrapper class that wraps ``torch.nn.Linear`` with normalization and nonlinearity. Args: in_features (int): Number of channels i
imaginaire/layers/conv.py:380
↓ 20 callersClassAttrDict
Dict as attribute trick.
imaginaire/config.py:19
↓ 9 callersClassRes2dBlock
r"""Residual block for 2D input. Args: in_channels (int) : Number of channels in the input tensor. out_channels (int) : Number of
imaginaire/layers/residual.py:448
↓ 9 callersClasstofp32
imaginaire/third_party/flow_net/flownet2/networks/submodules.py:86
↓ 8 callersClassConfig
r"""Configuration class. This should include every human specifiable hyperparameter values for your training.
imaginaire/config.py:76
↓ 8 callersClassGANLoss
r"""GAN loss constructor. Args: gan_mode (str): Type of GAN loss. ``'hinge'``, ``'least_square'``, ``'non_saturated'``, ``'wa
imaginaire/losses/gan.py:31
↓ 8 callersClasstofp16
imaginaire/third_party/flow_net/flownet2/networks/submodules.py:78
↓ 7 callersClass_PerceptualNetwork
r"""The network that extracts features to compute the perceptual loss. Args: network (nn.Sequential) : The network that extracts features
imaginaire/losses/perceptual.py:158
↓ 6 callersClassPerceptualLoss
r"""Perceptual loss initialization. Args: network (str) : The name of the loss network: 'vgg16' | 'vgg19'. layers (str or list of s
imaginaire/losses/perceptual.py:16
↓ 6 callersClassunetConv2
imaginaire/evaluation/segmentation/celebamask_hq.py:86
↓ 5 callersClassLabelEmbedder
r"""Embed the input label map to get embedded features. Args: emb_cfg (obj): Embed network configuration. num_input_channels (int
imaginaire/generators/fs_vid2vid.py:1072
↓ 5 callersClassLayerNorm
Subclass torch's LayerNorm to handle fp16.
imaginaire/evaluation/caption/clip.py:264
↓ 5 callersClassModLinear
r"""Linear layer with affine modulation (Based on StyleGAN2 mod demod). Equivalent to affine modulation following linear, but faster when the same
imaginaire/model_utils/gancraft/layers.py:66
↓ 4 callersClassBlur
imaginaire/third_party/upfirdn2d/upfirdn2d.py:116
↓ 4 callersClassFIDInceptionC
InceptionC block patched for FID computation
imaginaire/evaluation/pretrained.py:137
↓ 4 callersClassFeatureMatchingLoss
r"""Compute feature matching loss
imaginaire/losses/feature_matching.py:8
↓ 4 callersClassMLP
r"""Improved FUNIT style decoder. Args: input_dim (int): Input dimension (style code dimension). output_dim (int): Output dimensi
imaginaire/generators/funit.py:359
↓ 4 callersClassNLayerPatchDiscriminator
r"""Patch Discriminator constructor. Args: kernel_size (int): Convolution kernel size. num_input_channels (int): Num. of channels
imaginaire/discriminators/multires_patch.py:244
↓ 4 callersClassResDiscriminator
r"""Global residual discriminator. Args: image_channels (int): Num. of channels in the real/fake image. num_filters (int): Num. o
imaginaire/discriminators/residual.py:14
↓ 4 callersClassunetUp
imaginaire/evaluation/segmentation/celebamask_hq.py:114
↓ 3 callersClassApplyNoise
r"""Add Gaussian noise to the input tensor.
imaginaire/layers/misc.py:9
↓ 3 callersClassBlurUpsample
imaginaire/third_party/upfirdn2d/upfirdn2d.py:52
↓ 3 callersClassColorize
Class to colorize segmentation maps.
imaginaire/utils/visualization/common.py:261
↓ 3 callersClassFIDInceptionA
InceptionA block patched for FID computation
imaginaire/evaluation/pretrained.py:111
↓ 3 callersClassGaussianKLLoss
r"""Compute KL loss in VAE for Gaussian distributions
imaginaire/losses/kl.py:9
↓ 3 callersClassMeter
Meter is to keep track of statistics along steps. Meters write values for purpose like printing average values. Meters can be flushed to log f
imaginaire/utils/meters.py:76
↓ 3 callersClassMultiPatchDiscriminator
r"""Multi-resolution patch discriminator. Args: dis_cfg (obj): Discriminator part of the yaml config file. num_input_channels (in
imaginaire/discriminators/fs_vid2vid.py:259
↓ 3 callersClassMultiResPatchDiscriminator
r"""Multi-resolution patch discriminator. Args: num_discriminators (int): Num. of discriminators (one per scale). kernel_size (in
imaginaire/discriminators/multires_patch.py:103
↓ 2 callersClassAutoEncoder
r"""Improved UNIT autoencoder. Args: num_filters (int): Base filter numbers. max_num_filters (int): Maximum number of filters in
imaginaire/generators/unit.py:91
↓ 2 callersClassAutoEncoder
r"""Improved MUNIT autoencoder. Args: num_filters (int): Base filter numbers. max_num_filters (int): Maximum number of filters in
imaginaire/generators/munit.py:159
↓ 2 callersClassBlurDownsample
imaginaire/third_party/upfirdn2d/upfirdn2d.py:87
↓ 2 callersClassBottleneck
imaginaire/evaluation/caption/clip.py:110
↓ 2 callersClassCleanInceptionV3
imaginaire/evaluation/common.py:329
↓ 2 callersClassContentEncoder
r"""Improved FUNIT Content Encoder. This is basically the same as the original FUNIT content encoder. Args: num_downsamples (int): Nu
imaginaire/generators/funit.py:303
↓ 2 callersClassContentEncoder
r"""Improved UNIT encoder. The network consists of: - input layers - $(num_downsamples) convolutional blocks - $(num_res_blocks) residual
imaginaire/generators/unit.py:166
↓ 2 callersClassDecoder
r"""Improved FUNIT decoder. Args: num_enc_output_channels (int): Number of content feature channels. style_channels (int): Dimens
imaginaire/generators/funit.py:167
↓ 2 callersClassFlowGenerator
r"""flow generator constructor. Args: flow_cfg (obj): Flow definition part of the yaml config file. data_cfg (obj): Data definition
imaginaire/generators/fs_vid2vid.py:972
↓ 2 callersClassInceptionV3
imaginaire/evaluation/pretrained.py:67
↓ 2 callersClassMaskedL1Loss
r"""Masked L1 loss constructor.
imaginaire/losses/flow.py:17
↓ 2 callersClassModelAverage
r"""In this model average implementation, the spectral layers are absorbed in the model parameter by default. If such options are turned on, b
imaginaire/utils/model_average.py:35
↓ 2 callersClassReducedLabelMapper
imaginaire/model_utils/gancraft/mc_lbl_reduction.py:9
↓ 2 callersClassSPADEGenerator
r"""SPADE Image Generator constructor. Args: num_labels (int): Number of different labels. out_image_small_side_size (int): min(w
imaginaire/generators/spade.py:228
↓ 2 callersClassStyleEncoder
r"""Improved FUNIT Style Encoder. This is basically the same as the original FUNIT Style Encoder. Args: num_downsamples (int): Number
imaginaire/generators/funit.py:247
↓ 2 callersClassSwAV
imaginaire/evaluation/pretrained.py:40
↓ 2 callersClassTFInceptionV3
imaginaire/evaluation/pretrained.py:81
↓ 2 callersClassTransformer
imaginaire/evaluation/caption/clip.py:305
↓ 2 callersClassVgg16
imaginaire/evaluation/pretrained.py:53
↓ 2 callersClassWeightReshaper
r"""Handles all weight reshape related tasks.
imaginaire/generators/fs_vid2vid.py:786
↓ 2 callersClassWeightSharedMultiResPatchDiscriminator
r"""Multi-resolution patch discriminator with shared weights. Args: num_discriminators (int): Num. of discriminators (one per scale).
imaginaire/discriminators/multires_patch.py:175
↓ 2 callersClassWrappedModel
r"""Dummy wrapping the module.
imaginaire/utils/trainer.py:185
↓ 2 callersClassvgg16
imaginaire/evaluation/lpips.py:115
↓ 1 callersClassAdaptiveNorm
r"""Adaptive normalization layer. The layer first normalizes the input, then performs an affine transformation using parameters computed from the
imaginaire/layers/activation_norm.py:20
↓ 1 callersClassAffineMod
r"""Learning affine modulation of activation. Args: in_features (int): Number of input features. style_features (int): Number of
imaginaire/model_utils/gancraft/layers.py:10
↓ 1 callersClassAttentionModule
r"""Attention module constructor. Args: atn_cfg (obj): Generator definition part of the yaml config file. data_cfg (obj): Data defi
imaginaire/generators/fs_vid2vid.py:886
↓ 1 callersClassAttentionPool2d
imaginaire/evaluation/caption/clip.py:157
↓ 1 callersClassAugmentor
r"""Handles data augmentation using albumentations library.
imaginaire/utils/data.py:28
↓ 1 callersClassCLIP
imaginaire/evaluation/caption/clip.py:364
↓ 1 callersClassCOCOFUNITTranslator
r"""COCO-FUNIT Generator architecture. Args: num_filters (int): Base filter numbers. num_filters_mlp (int): Base filter number in
imaginaire/generators/coco_funit.py:71
↓ 1 callersClassCache
r"""This creates an on disk cache, which saves files as bytes. Args: root (str): Path to the cache dir. size_MB (float): Size of c
imaginaire/datasets/cache.py:16
↓ 1 callersClassDecoder
r"""Improved UNIT decoder. The network consists of: - $(num_res_blocks) residual blocks. - $(num_upsamples) residual blocks or convolutional
imaginaire/generators/unit.py:241
↓ 1 callersClassDecoder
r"""Improved MUNIT decoder. The network consists of - $(num_res_blocks) residual blocks. - $(num_upsamples) residual blocks or convolutional
imaginaire/generators/munit.py:342
↓ 1 callersClassDeepLabV2
imaginaire/evaluation/segmentation/cocostuff.py:10
↓ 1 callersClassDualAdaptiveNorm
imaginaire/layers/activation_norm.py:266
↓ 1 callersClassEmbedding2d
imaginaire/layers/conv.py:1370
↓ 1 callersClassEncoder
r"""Encoder for getting region-wise features for style control. Args: enc_cfg (obj): Encoder definition part of the yaml config file.
imaginaire/generators/pix2pixHD.py:276
↓ 1 callersClassFIDInceptionE_1
First InceptionE block patched for FID computation
imaginaire/evaluation/pretrained.py:166
↓ 1 callersClassFIDInceptionE_2
Second InceptionE block patched for FID computation
imaginaire/evaluation/pretrained.py:200
↓ 1 callersClassFPSEDiscriminator
r"""# Feature-Pyramid Semantics Embedding Discriminator. This is a copy of the discriminator in https://arxiv.org/pdf/1910.06809.pdf
imaginaire/discriminators/fpse.py:15
↓ 1 callersClassFPSEDiscriminator
imaginaire/discriminators/gancraft.py:133
↓ 1 callersClassFUNITTranslator
r""" Args: num_filters (int): Base filter numbers. num_filters_mlp (int): Base filter number in the MLP module. style_
imaginaire/generators/funit.py:68
↓ 1 callersClassFlatten
imaginaire/losses/perceptual.py:361
↓ 1 callersClassFlowGenerator
r"""Flow generator constructor. Args: flow_cfg (obj): Flow definition part of the yaml config file. data_cfg (obj): Data definition
imaginaire/generators/vid2vid.py:390
↓ 1 callersClassFlowLoss
r"""Flow loss constructor. Args: cfg (obj): Configuration.
imaginaire/losses/flow.py:45
↓ 1 callersClassFlowNet
imaginaire/third_party/flow_net/flow_net.py:17
↓ 1 callersClassFolderDataset
r"""This deals with opening, and reading from an Folder dataset. Args: root (str): Path to the folder. metadata (dict): Containin
imaginaire/datasets/folder.py:16
↓ 1 callersClassFromage
r"""Fromage optimizer implementation (https://arxiv.org/abs/2002.03432)
imaginaire/optimizers/fromage.py:11
↓ 1 callersClassFusedNonlinearity
imaginaire/third_party/bias_act/bias_act.py:190
↓ 1 callersClassGauGANLoader
r"""Manages the SPADE/GauGAN model used to generate pseudo-GTs for training GANcraft. Args: gaugan_cfg (Config): SPADE configuration.
imaginaire/trainers/gancraft.py:23
↓ 1 callersClassGlobalGenerator
r"""Coarse generator constructor. This is the main generator in the pix2pixHD architecture. Args: gen_cfg (obj): Generator definition
imaginaire/generators/pix2pixHD.py:223
↓ 1 callersClassHyperConv2d
r"""Hyper Conv2d initialization. Args: in_channels (int): Dummy parameter. out_channels (int): Dummy parameter. kernel_si
imaginaire/layers/conv.py:806
↓ 1 callersClassHyperRes2dBlock
r"""Hyper residual block for 2D input. Args: in_channels (int) : Number of channels in the input tensor. out_channels (int) : Num
imaginaire/layers/residual.py:667
↓ 1 callersClassHyperSpatiallyAdaptiveNorm
r"""Spatially Adaptive Normalization (SPADE) initialization. Args: num_features (int) : Number of channels in the input tensor. c
imaginaire/layers/activation_norm.py:334
↓ 1 callersClassImageEncoder
imaginaire/evaluation/caption/common.py:42
↓ 1 callersClassInfoNCELoss
imaginaire/losses/info_nce.py:33
↓ 1 callersClassLMDBDataset
r"""This deals with opening, and reading from an LMDB dataset. Args: root (str): Path to the LMDB file.
imaginaire/datasets/lmdb.py:19
↓ 1 callersClassLPIPSNet
imaginaire/evaluation/lpips.py:58
↓ 1 callersClassLPNet
imaginaire/evaluation/lpips.py:77
↓ 1 callersClassLayerNorm2d
r"""Layer Normalization as introduced in https://arxiv.org/abs/1607.06450. This is the usual way to apply layer normalization in CNNs. Not
imaginaire/layers/activation_norm.py:425
↓ 1 callersClassLocalEnhancer
r"""Local enhancer constructor. These are sub-networks that are useful when aiming to produce high-resolution outputs. Args: gen_cfg
imaginaire/generators/pix2pixHD.py:164
↓ 1 callersClassMLP
r"""The multi-layer perceptron (MLP) that maps Gaussian style code to a feature vector that is given as the conditional input to AdaIN. Args:
imaginaire/generators/munit.py:430
↓ 1 callersClassMadam
r"""MADAM optimizer implementation (https://arxiv.org/abs/2006.14560)
imaginaire/optimizers/madam.py:9
↓ 1 callersClassModifiedResNet
A ResNet class that is similar to torchvision's but contains the following changes: - There are now 3 "stem" convolutions as opposed to 1, wi
imaginaire/evaluation/caption/clip.py:198
↓ 1 callersClassModulatedConv2d
imaginaire/layers/conv.py:278
↓ 1 callersClassNetLinLayer
A single linear layer used as placeholder for LPIPS learnt weights
imaginaire/evaluation/lpips.py:35
↓ 1 callersClassObjectStoreDataset
r"""This deals with opening, and reading from an AWS S3 bucket. Args: root (str): Path to the AWS S3 bucket. aws_credentials_file
imaginaire/datasets/object_store.py:23
↓ 1 callersClassPixelLayerNorm
imaginaire/layers/activation_norm.py:555
↓ 1 callersClassPixelNorm
imaginaire/layers/activation_norm.py:503
↓ 1 callersClassQuickGELU
imaginaire/evaluation/caption/clip.py:273
↓ 1 callersClassRenderCNN
r"""CNN converting intermediate feature map to final image.
imaginaire/generators/gancraft_base.py:172
next →1–100 of 229, ranked by callers