Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vermeille/Torchelie
/ types & classes
Types & classes
261 in github.com/Vermeille/Torchelie
⨍
Functions
1,230
◇
Types & classes
261
↓ 32 callers
Class
CondSeq
An extension to torch's Sequential that allows conditioning either as a second forward argument or `condition()`
torchelie/nn/condseq.py:5
↓ 14 callers
Class
MBConv
torchelie/models/efficient.py:8
↓ 13 callers
Class
ParameterizedImg
A convenient wrapper around `PixelImage` and `SpectralImage` and `CorrelateColors` to make a learnable image. Args: *shape (int)
torchelie/data_learning.py:178
↓ 12 callers
Class
ResidualDiscriminator
torchelie/models/snres_discr.py:9
↓ 10 callers
Class
Recipe
Basic recipe that iterates mutiple epochs over a dataset. That loop is instrumented through several configurable callbacks. Callbacks can han
torchelie/recipes/recipebase.py:207
↓ 9 callers
Class
AverageMeter
Computes and stores the average and current value
wip/imagenet.py:430
↓ 9 callers
Class
ConvBlock
A packed block with Conv-BatchNorm-ReLU and various operations to alter it. Args: in_channels (int): input channels out_chan
torchelie/nn/conv.py:47
↓ 8 callers
Class
ClassificationHead
A one layer classification head, turning activations / features into class log probabilities. It initially contains an avgpool-flatten-l
torchelie/models/classifier.py:10
↓ 7 callers
Class
ResBlk
torchelie/models/pixcnn.py:63
↓ 7 callers
Class
StupidDataset
tests/test_datasets.py:4
↓ 6 callers
Class
ResNet
torchelie/models/resnet.py:112
↓ 6 callers
Class
UnlabeledImages
Serve all the images contained in a directory and subdirectories without any labels and structure constraint. Args: root (str):
torchelie/datasets/pix2pix.py:12
↓ 6 callers
Class
VQ
Quantization layer from *Neural Discrete Representation Learning* Args: embedding_dim (int): number of features along which to quant
torchelie/nn/vq.py:10
↓ 5 callers
Class
AdaBelief
r"""Implements AdaBelief algorithm. AdaBelief from `AdaBelief Optimizer: Adapting Stepsizes by the Belief in Observed Gradients <https://arxi
torchelie/optim.py:109
↓ 5 callers
Class
InterpolateBilinear2d
A wrapper around :func:`pytorch.nn.functional.interpolate` with bilinear mode.
torchelie/nn/interpolate.py:43
↓ 5 callers
Class
PatchDiscriminator
torchelie/models/patchgan.py:8
↓ 5 callers
Class
RunningAvg
Average by keeping the whole sum and number of elements of the data logged. Useful when the metrics come per batch and an accurate number for
torchelie/callbacks/avg.py:9
↓ 4 callers
Class
AutoGAN
Generator discovered in AutoGAN: Neural Architecture Search for Generative Adversarial Networks. Args: arch (list): architecture
torchelie/models/autogan.py:12
↓ 4 callers
Class
BinomialFilter2d
torchelie/transforms/differentiable.py:123
↓ 4 callers
Class
Lookahead
Implements Lookahead from `Lookahead Optimizer: k steps forward, 1 step back` (Zhang et al, 2019) Args: base_optimizer (Optimize
torchelie/optim.py:316
↓ 4 callers
Class
MlpMixer
torchelie/models/mlpmixer.py:56
↓ 4 callers
Class
MultiBranch
Transform an image with multiple transforms Args: transforms (list of transforms): the parallel set of transforms
torchelie/transforms/__init__.py:99
↓ 4 callers
Class
RAdamW
r"""Implements RAdamW algorithm. RAdam from `On the Variance of the Adaptive Learning Rate and Beyond <https://arxiv.org/abs/1908.03265v1>`_
torchelie/optim.py:204
↓ 4 callers
Class
SEBlock
A Squeeze-And-Excite block Args: in_ch (int): input channels reduction (int): channels reduction factor for the hidden numbe
torchelie/nn/resblock.py:12
↓ 4 callers
Class
VGG
Construct a VGG-like model. The architecture is composed of either the number of channels or 'M' for a maxpool operation. This creates a
torchelie/models/vgg.py:10
↓ 3 callers
Class
AttentionBlock
torchelie/models/attention.py:60
↓ 3 callers
Class
AutoGANGenBlock
A block of the generator discovered by AutoGAN. Args: in_ch (int): number of input channels out_ch (int): number of output c
torchelie/nn/blocks.py:100
↓ 3 callers
Class
CachedDataset
Wrap a dataset. Lazily caches *in RAM* elements returned by the underlying dataset. Args: ds (Dataset): A dataset transf
torchelie/datasets/__init__.py:383
↓ 3 callers
Class
ConvNeXt
torchelie/models/convnext.py:35
↓ 3 callers
Class
DeepDreamOptim
r"""Optimizer used by Deep Dream. It rescales the gradient by the average of the absolute values of the gradient. :math:`\theta_i := \theta_i
torchelie/optim.py:7
↓ 3 callers
Class
FakeImg
tests/test_recipes.py:25
↓ 3 callers
Class
ImageNetInputNorm
Normalize images channels as torchvision models expects, in a differentiable way
torchelie/nn/imagenetinputnorm.py:5
↓ 3 callers
Class
MultiScaleDiscriminator
torchelie/models/pix2pixhd.py:169
↓ 3 callers
Class
NeuralStyleLoss
Style Transfer loss by Leon Gatys https://arxiv.org/abs/1508.06576 set the style and content before performing a forward pass.
torchelie/loss/neuralstyleloss.py:15
↓ 3 callers
Class
PerceptualNet
Make a VGG16 with appropriately named layers that records intermediate activations. Args: layers (list of str): the names of the
torchelie/models/perceptualnet.py:9
↓ 3 callers
Class
Pix2PixGenerator
UNet generator from Pix2Pix. Dropout layers have been substitued with Noise injections from StyleGAN2. Args: arch (List[int]): t
torchelie/models/pix2pix.py:10
↓ 3 callers
Class
Pix2PixHDGlobalGenerator
Residual generator used in `Pix2PixHD <https://arxiv.org/abs/1711.11585>`_ . :code:`arch` is a list of strings representing blocks.
torchelie/models/pix2pixhd.py:11
↓ 3 callers
Class
PixelImage
A learnable image parameterized by its pixel values Args: shape (tuple of int): a tuple like (channels, height, width) sd (f
torchelie/data_learning.py:29
↓ 3 callers
Class
SpectralImage
A learnable image parameterized by its Fourier representation. See https://distill.pub/2018/differentiable-parameterizations/ Implement
torchelie/data_learning.py:66
↓ 3 callers
Class
WindowAvg
Average a window containing the `k` previous logged values Args: k (int): the window's length
torchelie/callbacks/avg.py:40
↓ 2 callers
Class
AdaIN2d
Adaptive InstanceNormalization from `*Arbitrary Style Transfer in Real-time with Adaptive Instance Normalization* (Huang et al, 2017) <ht
torchelie/nn/adain.py:8
↓ 2 callers
Class
AdaptPad
Pad an input image so that it reaches size `size` Args: sz ((int, int)): target size padding_mode (str): one of the modes of
torchelie/transforms/__init__.py:62
↓ 2 callers
Class
AlexNet
torchelie/models/alexnet.py:11
↓ 2 callers
Class
Algorithm
Define a customizable sequence of code blocks.
torchelie/recipes/algorithm.py:6
↓ 2 callers
Class
CorrelateColors
Takes an learnable image and applies the inverse color decorrelation from ImageNet (ie, it correlates the color like ImageNet to ease optimiz
torchelie/data_learning.py:130
↓ 2 callers
Class
Dataset
wip/adain.py:94
↓ 2 callers
Class
DeepDream
Deep Dream recipe First instantiate the recipe then call `recipe(n_iter, img)` Args: model (nn.Module): the trained model to us
torchelie/recipes/deepdream.py:29
↓ 2 callers
Class
DeepDreamLoss
The Deep Dream loss Args: model (nn.Module): a pretrained network on which to compute the activations dream_laye
torchelie/loss/deepdreamloss.py:8
↓ 2 callers
Class
ExponentialAvg
r""" Keep an exponentially decaying average of the values according to :math:`y := \beta y + (1 - \beta) x` Args: beta (float):
torchelie/callbacks/avg.py:69
↓ 2 callers
Class
FeatureVis
Feature viz First instantiate the recipe then call `recipe(n_iter, img)` Args: model (nn.Module): the trained model to use
torchelie/recipes/feature_vis.py:21
↓ 2 callers
Class
Hourglass
Hourglass model from Deep Image Prior.
torchelie/models/hourglass.py:8
↓ 2 callers
Class
LinearReLU
torchelie/models/stylegan2.py:14
↓ 2 callers
Class
MaskedConv2d
A masked 2D convolution for PixelCNN Args: in_chan (int): number of input channels out_chan (int): number of output channels
torchelie/nn/maskedconv.py:8
↓ 2 callers
Class
MixUpDataset
Linearly mixes two samples and labels from a dataset according to the MixUp algorithm https://arxiv.org/abs/1905.02249 Args:
torchelie/datasets/__init__.py:167
↓ 2 callers
Class
ModulatedConv
torchelie/nn/layers.py:35
↓ 2 callers
Class
NeuralStyle
Neural Style Recipe First instantiate the recipe then call `recipe(n_iter, img)` Args: device (device): where to run the comput
torchelie/recipes/neural_style.py:18
↓ 2 callers
Class
NoLim
torchelie/recipes/gan.py:49
↓ 2 callers
Class
Noise
Add gaussian noise to the input, with a per channel or global learnable std. Args: ch (int): number of input channels for a differen
torchelie/nn/noise.py:6
↓ 2 callers
Class
PixelCNN
A PixelCNN model with 6 blocks Args: hid (int): the number of hidden channels in the blocks sz ((int, int)): the size of the
torchelie/models/pixcnn.py:147
↓ 2 callers
Class
PixelPredictor
torchelie/models/pixcnn.py:52
↓ 2 callers
Class
ProgressMeter
wip/imagenet.py:458
↓ 2 callers
Class
ResNetInput
torchelie/models/resnet.py:16
↓ 2 callers
Class
Rotate90
wip/adain.py:126
↓ 2 callers
Class
SampledParams
torchelie/hyper.py:235
↓ 2 callers
Class
SpadeResBlock
A Spade ResBlock from `Semantic Image Synthesis with Spatially-Adaptive Normalization` https://arxiv.org/abs/1903.07291
torchelie/nn/blocks.py:74
↓ 2 callers
Class
Subsample
Randomly subsample images. Args: p (float): the transform is applied with probability p max_ratio (int): maximum subscaling
torchelie/transforms/augments.py:163
↓ 2 callers
Class
TrueOrFakeLabelDataset
examples/conditional.py:33
↓ 2 callers
Class
UNet
U-Net from `U-Net: Convolutional Networks for Biomedical Image Segmentation <https://arxiv.org/abs/1505.04597>`_. This net has architectural
torchelie/models/unet.py:11
↓ 2 callers
Class
UniformSampler
Uniform sampler. Args: low (float): lower bound high (float): higher bound
torchelie/hyper.py:39
↓ 2 callers
Class
ZFNet
torchelie/models/alexnet.py:50
↓ 1 callers
Class
ADATF
torchelie/recipes/stylegan2.py:17
↓ 1 callers
Class
AdaIN
wip/adain.py:16
↓ 1 callers
Class
AddSign
r"""AddSign optimizer from Neural Optimiser search with Reinforcment learning (Bello et al, 2017) :math:`\theta_i := \theta_i - \text{lr}(1+\
torchelie/optim.py:54
↓ 1 callers
Class
AttenNorm2d
From https://arxiv.org/abs/1908.01259
torchelie/nn/batchnorm.py:204
↓ 1 callers
Class
Attention56Bone
Attention56 bone Args: in_ch (int): number of channels in the images
torchelie/models/attention.py:102
↓ 1 callers
Class
CallbacksRunner
torchelie/recipes/recipebase.py:6
↓ 1 callers
Class
Canny
Run Canny edge detector over an image. Requires OpenCV to be installed Args: thresh_low (int): lower threshold (default: 100)
torchelie/transforms/augments.py:253
↓ 1 callers
Class
CatedLists
torchelie/datasets/concat.py:31
↓ 1 callers
Class
CatedSamples
torchelie/datasets/concat.py:10
↓ 1 callers
Class
ChannelMlpBlock
torchelie/models/mlpmixer.py:25
↓ 1 callers
Class
ColoredColumns
A dataset of precedurally generated images of columns randomly colorized. Args: *size (int): size of images transform (trans
torchelie/datasets/debug.py:14
↓ 1 callers
Class
ColoredRows
A dataset of precedurally generated images of rows randomly colorized. Args: *size (int): size of images transform (transfor
torchelie/datasets/debug.py:39
↓ 1 callers
Class
ContinuousCEWithLogits
Cross Entropy loss accepting continuous target values See :func:`torchelie.loss.continuous_cross_entropy` for details.
torchelie/loss/__init__.py:36
↓ 1 callers
Class
ConvNeXtBlock
torchelie/models/convnext.py:20
↓ 1 callers
Class
CosineDecay
Allow to pre-specify learning rate and momentum changes Args: optimizer (torch.optim.Optimizer): the optimizer to schedule. Currentl
torchelie/lr_scheduler.py:95
↓ 1 callers
Class
CurriculumScheduler
Allow to pre-specify learning rate and momentum changes Args: optimizer (torch.optim.Optimizer): the optimizer to schedule. Currentl
torchelie/lr_scheduler.py:10
↓ 1 callers
Class
Cutout
Applies a random Cutout filter erasing at most :code:`max_size*100`% of the picture. Args: max_size (float): the maximum ratio t
torchelie/transforms/augments.py:73
↓ 1 callers
Class
Dataset
tests/test_tensorboard_callback.py:16
↓ 1 callers
Class
Debug
An pass-through layer that prints some debug info during forward pass. It prints its name, the input's shape, mean of channels means, mean,
torchelie/nn/debug.py:7
↓ 1 callers
Class
DetachedModule
Wrap a module to eval model, can't be turned back to training mode, and make it invisible to recursive calls on `nn.Module`s Args:
torchelie/utils.py:443
↓ 1 callers
Class
FakeData
tests/test_recipes.py:15
↓ 1 callers
Class
FiLM2d
Feature-wise Linear Modulation from https://distill.pub/2018/feature-wise-transformations/ The difference with AdaIN is that FiLM does no
torchelie/nn/adain.py:72
↓ 1 callers
Class
FocalLoss
The focal loss https://arxiv.org/abs/1708.02002 See :func:`torchelie.loss.focal_loss` for details.
torchelie/loss/focal.py:6
↓ 1 callers
Class
FrozenModule
Wrap a module to eval model, can't be turned back to training mode Args: m (nn.Module): a module
torchelie/utils.py:423
↓ 1 callers
Class
GaussianSelector
torchelie/hyper.py:179
↓ 1 callers
Class
GradientPenalty
torchelie/recipes/unpaired.py:225
↓ 1 callers
Class
GradientPenalty
torchelie/recipes/cut.py:251
↓ 1 callers
Class
GradientPenalty
torchelie/recipes/stylegan2.py:95
↓ 1 callers
Class
GradientPenalty
torchelie/recipes/pix2pix.py:94
↓ 1 callers
Class
GradientPenaltyM
torchelie/recipes/cut.py:22
next →
1–100 of 261, ranked by callers