Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Vermeille/Torchelie
/ functions
Functions
1,230 in github.com/Vermeille/Torchelie
⨍
Functions
1,230
◇
Types & classes
261
↓ 3 callers
Function
insert_before
Insert module :code:`new` with name :code:`name` before element :code:`key` in sequential :code:`base` and return the new sequence.
torchelie/nn/utils.py:277
↓ 3 callers
Method
insert_before
(self, key: str, name: str, func=None)
torchelie/recipes/algorithm.py:58
↓ 3 callers
Method
inverse
(self, x)
torchelie/hyper.py:83
↓ 3 callers
Function
layer_by_name
Get a submodule at any depth of a net by its name Args: net (nn.Module): the base module containing other modules name (str)
torchelie/utils.py:217
↓ 3 callers
Function
patch34
Patch Discriminator from pix2pix
torchelie/models/patchgan.py:114
↓ 3 callers
Function
pix2pix_128
The architecture used in `Pix2Pix <https://arxiv.org/abs/1611.07004>`_, able to train on 128x128 or 512x512 images.
torchelie/models/pix2pix.py:84
↓ 3 callers
Method
read_metadata
(self, offset: int)
torchelie/datasets/ms1m.py:38
↓ 3 callers
Method
remove_batchnorm
(self)
torchelie/models/alexnet.py:73
↓ 3 callers
Method
reset
(self, state)
torchelie/callbacks/callbacks.py:908
↓ 3 callers
Function
resnet152
(num_classes: int)
torchelie/models/resnet.py:285
↓ 3 callers
Method
sample_
(self, img: torch.Tensor, temp: float = 0, start_coord: Tuple[
torchelie/models/pixcnn.py:206
↓ 3 callers
Method
set_content
Set the content. Args: content_img (3xHxW tensor): an image tensor content_layer (str, optional): the layer
torchelie/loss/neuralstyleloss.py:80
↓ 3 callers
Method
set_stride
(self, stride: int)
torchelie/models/resnet.py:33
↓ 3 callers
Method
set_style
Set the style. Args: style_img (3xHxW tensor): an image tensor style_ratio (float): a multiplier for the sty
torchelie/loss/neuralstyleloss.py:55
↓ 3 callers
Method
state_dict
(self)
torchelie/optim.py:342
↓ 3 callers
Method
state_dict
(self)
torchelie/callbacks/callbacks.py:381
↓ 3 callers
Function
tempered_log_softmax
Tempered log softmax. Computes log softmax along dimension 1 Args: x (tensor): activations t (float): temperature n_
torchelie/loss/bitempered.py:26
↓ 3 callers
Function
test_fun
(batch)
torchelie/recipes/cut.py:332
↓ 3 callers
Method
to_bottleneck
(self)
torchelie/models/resnet.py:178
↓ 3 callers
Method
to_preact
(self)
torchelie/models/resnet.py:186
↓ 3 callers
Method
to_preact_bottleneck
(self)
torchelie/models/resnet.py:182
↓ 3 callers
Method
to_preact_resnext
(self)
torchelie/models/resnet.py:194
↓ 3 callers
Method
to_resnext
(self)
torchelie/models/resnet.py:190
↓ 3 callers
Method
to_two_layers
Set the classifier architecture to avgpool-flatten-linear1-relu-linear2.
torchelie/models/classifier.py:50
↓ 2 callers
Function
Classification
Classification training and testing loop. Both forward functions must return a per-batch loss and logits predictions. It expands from :co
torchelie/recipes/classification.py:29
↓ 2 callers
Method
__init__
(self, images: List[str], transform: Optional[Any])
wip/singan.py:79
↓ 2 callers
Method
__init__
(self, k: int = 100)
torchelie/callbacks/avg.py:47
↓ 2 callers
Method
__init__
( self, num_embeddings: int, embedding_dim: int, *, dim: int = 1,
torchelie/nn/vq.py:29
↓ 2 callers
Method
__init__
(self, lam: nn.Module)
torchelie/nn/reshape.py:13
↓ 2 callers
Method
__init__
(self, paths: List[str], transform: Optional[Callable] = None)
torchelie/datasets/pix2pix.py:57
↓ 2 callers
Method
__init__
(self, in_features: int, out_features)
torchelie/models/stylegan2.py:19
↓ 2 callers
Method
__init__
(self, num_classes, arch)
torchelie/models/convnext.py:36
↓ 2 callers
Method
__init__
(self, arch: List[str], num_classes: int)
torchelie/models/resnet.py:113
↓ 2 callers
Method
_body
(self, x: torch.Tensor)
torchelie/models/pixcnn.py:125
↓ 2 callers
Method
_check_init
(self)
torchelie/recipes/recipebase.py:100
↓ 2 callers
Function
_gblur_kernel
()
torchelie/transforms/differentiable.py:86
↓ 2 callers
Function
_make_resnet_shortcut
(in_channels: int, out_channels: int, stride: int)
torchelie/nn/resblock.py:38
↓ 2 callers
Method
_mix
(self, m: torch.Tensor, prob: float)
torchelie/transforms/differentiable.py:291
↓ 2 callers
Function
_rollx
(img, begin)
torchelie/transforms/differentiable.py:11
↓ 2 callers
Function
_rolly
(img, begin)
torchelie/transforms/differentiable.py:15
↓ 2 callers
Function
accuracy
Computes the accuracy over the k top predictions for the specified values of k
wip/imagenet.py:491
↓ 2 callers
Method
add_prologues
(self, cbs)
torchelie/recipes/recipebase.py:63
↓ 2 callers
Method
add_se
(self)
torchelie/models/resnet.py:209
↓ 2 callers
Method
analyze
(self, batch: torch.Tensor, pred: torch.Tensor, true: torch.Te
torchelie/callbacks/inspector.py:158
↓ 2 callers
Function
beale
(x, y)
tests/test_hyper.py:7
↓ 2 callers
Method
condition
(self, z: torch.Tensor)
torchelie/nn/encdec.py:99
↓ 2 callers
Function
deprecate_doc
(doc)
torchelie/utils.py:709
↓ 2 callers
Method
display
(self, batch, viz)
wip/imagenet.py:465
↓ 2 callers
Method
down
(self, in_ch, out_ch, ks)
torchelie/models/hourglass.py:54
↓ 2 callers
Method
dynamic_init
(self)
wip/singan.py:27
↓ 2 callers
Function
edit_model
Allow to edit any part of a model by recursively editing its modules. For instance, in order to delete all dropout layers and change relus i
torchelie/nn/utils.py:183
↓ 2 callers
Method
fit
Run the recipe Args: n_iters (int): number of iterations to run neuron (int): the feature map to maximize
torchelie/recipes/feature_vis.py:60
↓ 2 callers
Method
fit
Run the recipe Args: n_iters (int): number of iterations to run content (PIL.Image): content image
torchelie/recipes/neural_style.py:37
↓ 2 callers
Function
focal_loss
r""" Returns the focal loss between `target` and `input` :math:`\text{FL}(p_t)=-(1-p_t)^\gamma\log(p_t)`
torchelie/loss/functional/__init__.py:31
↓ 2 callers
Function
get_dataset
(dataset_specs: Tuple[str, str], img_size: int, train: bool)
torchelie/recipes/pix2pix.py:20
↓ 2 callers
Method
get_model
(self, name, *args, **kwargs)
torchelie/models/registry.py:43
↓ 2 callers
Method
init_img
(self, init_img)
torchelie/data_learning.py:56
↓ 2 callers
Function
input_noise
(size, channels)
torchelie/recipes/image_prior.py:42
↓ 2 callers
Function
kaiming_gain
Return the std needed to initialize a weight matrix with given parameters.
torchelie/utils.py:69
↓ 2 callers
Function
lerp
(a: float, b: float, t: float)
torchelie/utils.py:463
↓ 2 callers
Method
log
(self, iters, xs, store_history=[])
torchelie/callbacks/callbacks.py:588
↓ 2 callers
Method
log
(self, xs, epoch, epoch_batch, store_history=[])
torchelie/callbacks/callbacks.py:640
↓ 2 callers
Function
log_t
(x: torch.Tensor, t: float)
torchelie/loss/bitempered.py:5
↓ 2 callers
Method
lookup
(self, x: torch.Tensor)
torchelie/nn/vq.py:102
↓ 2 callers
Function
make_G
()
torchelie/recipes/unpaired.py:141
↓ 2 callers
Function
make_bn
(base, name)
torchelie/nn/batchnorm.py:93
↓ 2 callers
Function
make_cbn
(base, name)
torchelie/nn/batchnorm.py:117
↓ 2 callers
Method
make_html
(self, state)
torchelie/callbacks/callbacks.py:234
↓ 2 callers
Function
make_loop
(hourglass, body, display, num_iter, lr)
torchelie/recipes/image_prior.py:146
↓ 2 callers
Function
make_no_affine
(base, name)
torchelie/nn/batchnorm.py:73
↓ 2 callers
Function
make_preact_resnet_shortcut
(in_ch: int, out_ch: int, stride: int)
torchelie/nn/resblock.py:231
↓ 2 callers
Function
make_spade
(base, name)
torchelie/nn/batchnorm.py:159
↓ 2 callers
Method
manifold_estimate
(self, base: np.ndarray, query: np.ndarray,
torchelie/callbacks/callbacks.py:1219
↓ 2 callers
Method
named_callbacks
(self)
torchelie/recipes/recipebase.py:25
↓ 2 callers
Method
no_relu
Remove the ReLU
torchelie/nn/conv.py:210
↓ 2 callers
Function
ortho
r""" Returns the orthogonal loss for weight matrix `m`, from Big GAN. https://arxiv.org/abs/1809.11096 :math:`R_{\beta}(W)= ||W^T W \od
torchelie/loss/functional/__init__.py:8
↓ 2 callers
Method
read_hpsearch
(self)
torchelie/hyper.py:291
↓ 2 callers
Function
remove_weight_lambda
Remove the hook :code:`hook_name` applied on member :code:`name` of :code:`module`. Args: module (nn.Module): the module on whic
torchelie/nn/utils.py:109
↓ 2 callers
Function
res_discr_4l
()
torchelie/models/snres_discr.py:123
↓ 2 callers
Function
res_discr_5l
()
torchelie/models/snres_discr.py:135
↓ 2 callers
Function
res_discr_6l
()
torchelie/models/snres_discr.py:148
↓ 2 callers
Function
res_discr_7l
()
torchelie/models/snres_discr.py:161
↓ 2 callers
Method
reset
Recreate the block as a simple conv-BatchNorm-ReLU
torchelie/nn/conv.py:81
↓ 2 callers
Function
resnet18
(num_classes: int)
torchelie/models/resnet.py:247
↓ 2 callers
Method
resnext
(self)
torchelie/nn/resblock.py:110
↓ 2 callers
Method
rotate
Rotate the image by an angle randomly sampled between [-theta, theta] Args: theta (float): an angle in degrees
torchelie/transforms/differentiable.py:228
↓ 2 callers
Method
rotate_half
(self, x: torch.Tensor)
torchelie/nn/llm.py:51
↓ 2 callers
Method
set_encoder_num_layers
(self, num_layers: int)
torchelie/nn/encdec.py:124
↓ 2 callers
Method
set_encoder_num_layers
(self, num: int)
torchelie/models/unet.py:79
↓ 2 callers
Method
skip
(self, in_ch, out_ch)
torchelie/models/hourglass.py:65
↓ 2 callers
Method
state_dict
(self)
torchelie/utils.py:589
↓ 2 callers
Function
tempered_cross_entropy
The bi-tempered loss from https://arxiv.org/abs/1906.03361 Args: x (tensor): a tensor of batched logits like for cross_entropy
torchelie/loss/bitempered.py:60
↓ 2 callers
Function
tempered_nll_loss
Compute tempered nll loss Args: x (tensor): activations of log softmax y (tensor): labels t1 (float): temperature 1
torchelie/loss/bitempered.py:86
↓ 2 callers
Method
to_bilinear_sampling
(self)
torchelie/nn/encdec.py:88
↓ 2 callers
Method
to_differential_lr
(self, lr: float)
torchelie/models/stylegan2.py:41
↓ 2 callers
Method
to_equal_lr
(self)
torchelie/models/stylegan2.py:33
↓ 2 callers
Method
to_preact
Place the normalization and ReLU before the convolution.
torchelie/nn/conv.py:218
↓ 2 callers
Method
to_preact_wide
(self)
torchelie/models/resnet.py:202
↓ 2 callers
Method
to_wide
(self)
torchelie/models/resnet.py:198
↓ 2 callers
Function
total_variation
Returns the total variation loss for batch of images `i`
torchelie/loss/functional/__init__.py:21
← previous
next →
101–200 of 1,230, ranked by callers