MCPcopy Create free account

hub / github.com/LouisRouss/Diffusion-Based-Model-for-Colorization / functions

Functions47 in github.com/LouisRouss/Diffusion-Based-Model-for-Colorization

↓ 8 callersFunctionextract
(a, t, x_shape)
src/diffusion.py:10
↓ 7 callersMethod__init__
(self, beta)
src/network.py:96
↓ 4 callersFunctionnormalization
Make a standard normalization layer. :param channels: number of input channels. :return: an nn.Module for normalization.
src/network.py:13
↓ 3 callersFunctionzero_module
Zero out the parameters of a module and return it.
src/network.py:21
↓ 2 callersFunctioncheckpoint
Evaluate a function without caching intermediate activations, allowing for reduced memory at the expense of extra compute in the backward pas
src/network.py:29
↓ 2 callersFunctioncount_flops_attn
A counter for the `thop` package to count the operations in an attention operation. Meant to be used like: macs, params = thop.pr
src/network.py:343
↓ 2 callersMethodsave_model
(self,name,EMA=False)
src/trainer.py:69
↓ 1 callersMethodbackward
(ctx, *output_grads)
src/network.py:76
↓ 1 callersMethodforward
(self, x)
src/network.py:152
↓ 1 callersFunctionload_config
(path)
src/config.py:26
↓ 1 callersFunctionmain
()
main.py:5
↓ 1 callersMethodnoise_prediction
Use the NN to predict the noise added between y_{t-1} and y_t
src/diffusion.py:48
↓ 1 callersMethodnoisy_image
Compute y_noisy according to (6) p15 of [2]
src/diffusion.py:42
↓ 1 callersFunctiontimestep_embedding
Create sinusoidal timestep embeddings. :param timesteps: a 1-D Tensor of N indices, one per batch element. These may be
src/network.py:45
↓ 1 callersFunctiontrain
(config)
src/train.py:5
↓ 1 callersMethodtrain
(self)
src/trainer.py:75
↓ 1 callersMethodupdate_average
(self, old, new)
src/network.py:105
↓ 1 callersMethodupdate_model_average
(self, ma_model, current_model)
src/network.py:100
Method__getattr__
(self, name)
src/config.py:12
Method__getitem__
(self,idx)
src/dataloader.py:17
Method__init__
(self, config_path)
src/config.py:6
Method__init__
(self, channels, use_conv, out_channels=None)
src/network.py:144
Method__init__
(self, channels, use_conv, out_channels=None)
src/network.py:166
Method__init__
( self, channels, emb_channels, dropout, out_channels=None, us
src/network.py:200
Method__init__
( self, channels, num_heads=1, num_head_channels=-1, use_checkpoint=Fa
src/network.py:303
Method__init__
(self, n_heads)
src/network.py:367
Method__init__
(self, n_heads)
src/network.py:399
Method__init__
( self, image_size, in_channels, model_channels, out_channels,
src/network.py:454
Method__init__
(self,path_color,path_gray)
src/dataloader.py:9
Method__init__
( #Remplacer par fichier config self, image_size = (224,224), channel_y = 3,
src/diffusion.py:16
Method__init__
(self,config)
src/trainer.py:20
Method__len__
(self)
src/dataloader.py:15
Method_forward
(self, x, emb)
src/network.py:274
Method_forward
(self, x)
src/network.py:335
Methodcount_flops
(model, _x, y)
src/network.py:390
Methodcount_flops
(model, _x, y)
src/network.py:424
Methodforward
(self, x)
src/network.py:10
Methodforward
(ctx, run_function, length, *args)
src/network.py:67
Methodforward
Apply the module to `x` given `emb` timestep embeddings.
src/network.py:116
Methodforward
(self, x, emb)
src/network.py:128
Methodforward
(self, x)
src/network.py:180
Methodforward
Apply the block to a Tensor, conditioned on a timestep embedding. :param x: an [N x C x ...] Tensor of features. :param emb:
src/network.py:263
Methodforward
(self, x)
src/network.py:332
Methodforward
Apply QKV attention. :param qkv: an [N x (H * 3 * C) x T] tensor of Qs, Ks, and Vs. :return: an [N x (H * C) x T] tensor afte
src/network.py:371
Methodforward
Apply QKV attention. :param qkv: an [N x (3 * H * C) x T] tensor of Qs, Ks, and Vs. :return: an [N x (H * C) x T] tensor afte
src/network.py:403
Methodforward
Apply the model to an input batch. :param y: a [N x 3 x ...] Tensor of noisy colored images :param x: an [N x 1 x ...] Tenso
src/network.py:633
Methodprint
(self)
src/config.py:17