MCPcopy Create free account

hub / github.com/Vermeille/Torchelie / functions

Functions1,230 in github.com/Vermeille/Torchelie

↓ 1 callersFunctionentropy
Compute the entropy of the categorical distribution specified by the logits `out` along dimension `dim`. Args: out (tensor): log
torchelie/utils.py:46
↓ 1 callersFunctionfast_zero_grad
Set :code:`.grad` to None for all parameters instead of zeroing out. It is faster.
torchelie/utils.py:19
↓ 1 callersMethodfetch
(self, model: str)
torchelie/models/registry.py:22
↓ 1 callersMethodfilename
(self, state)
torchelie/callbacks/callbacks.py:741
↓ 1 callersFunctionflatvgg
()
scripts/stylevgg.py:45
↓ 1 callersMethodflip_x
(self, p: float, prob: float = 1.)
torchelie/transforms/differentiable.py:245
↓ 1 callersMethodflip_y
(self, p: float, prob: float = 1.)
torchelie/transforms/differentiable.py:254
↓ 1 callersMethodforward
Return the tensor
torchelie/data_learning.py:226
↓ 1 callersMethodforward
(self, x, z=None)
torchelie/nn/batchnorm.py:173
↓ 1 callersMethodforward
(self, x: torch.Tensor)
torchelie/models/pixcnn.py:83
↓ 1 callersMethodfrom_source
(self, src: str, model: str)
torchelie/models/registry.py:12
↓ 1 callersMethodget_acts_
(self, img: torch.Tensor, detach: bool)
torchelie/loss/deepdreamloss.py:31
↓ 1 callersFunctionget_args
()
examples/imagenet.py:15
↓ 1 callersFunctionget_args
()
examples/cifar.py:25
↓ 1 callersFunctionget_datasets
(train_path, test_path, train_im_size, test_im_size)
examples/imagenet.py:56
↓ 1 callersFunctionget_datasets
()
examples/cifar.py:50
↓ 1 callersFunctionget_model
(network, num_classes, rank, weights=None, pretrained=None)
examples/imagenet.py:63
↓ 1 callersMethodget_params
Get parameters for ``crop``. Args: img (PIL Image): Image to be cropped. scale (float): range of size of the origin si
torchelie/transforms/__init__.py:158
↓ 1 callersFunctiongram
Return the Gram matrix of `m` Args: m (tensor): a matrix of dim 2 Returns: The Gram matrix
torchelie/utils.py:250
↓ 1 callersMethodhandle_http
(self, status, content_type, content)
torchelie/hyper.py:501
↓ 1 callersFunctionilerp
r""" Inverse or lerp. For `t` between `a` and `b`, returns the fraction or `a` and `b` in `t`. :math:`\frac{t - a}{b - a}` Args:
torchelie/utils.py:500
↓ 1 callersFunctionimg2html
Convert an image to a b64 html inline image. Possible options: width (int, pixels), height (int, pixels) or jpgquality (int, percentage)
torchelie/callbacks/inspector.py:12
↓ 1 callersMethodinit_img
(self, init_img: torch.Tensor)
torchelie/data_learning.py:109
↓ 1 callersMethodinit_img
(self, init_img)
torchelie/data_learning.py:219
↓ 1 callersFunctioninsert_after
Insert module :code:`new` with name :code:`name` after element :code:`key` in sequential :code:`base` and return the new sequence.
torchelie/nn/utils.py:258
↓ 1 callersMethodinverse
(self, samples)
torchelie/hyper.py:165
↓ 1 callersMethodinvert
Decorrelate the color of the image `t` and return the result
torchelie/data_learning.py:158
↓ 1 callersMethodinvert
(self, x: torch.Tensor)
torchelie/data_learning.py:174
↓ 1 callersMethodkey
(l)
torchelie/loss/perceptualloss.py:33
↓ 1 callersFunctionlambdas
(a: torch.Tensor, t: float, n_iters: int = 3)
torchelie/loss/bitempered.py:17
↓ 1 callersMethodload_state_dict
(self, state_dict)
torchelie/utils.py:596
↓ 1 callersMethodload_state_dict
(self, dicc)
torchelie/callbacks/callbacks.py:386
↓ 1 callersFunctionlocal_attention_2d
(x: Tensor, conv_kqv: nn.Conv2d, posenc: Tensor, num_heads: int, patch_size: int)
torchelie/nn/functional/transformer.py:9
↓ 1 callersMethodlog_loss
(self, loss: float)
torchelie/recipes/stylegan2.py:49
↓ 1 callersMethodlog_prob
(self, x: torch.Tensor)
torchelie/distributions.py:54
↓ 1 callersMethodlog_result
Logs hyper parameters and results.
torchelie/hyper.py:311
↓ 1 callersFunctionmain
()
wip/imagenet.py:134
↓ 1 callersFunctionmain_worker
(gpu, ngpus_per_node, args)
wip/imagenet.py:171
↓ 1 callersFunctionmake_D
(inputs)
torchelie/recipes/unpaired.py:158
↓ 1 callersFunctionmake_html
()
torchelie/hyper.py:331
↓ 1 callersFunctionmake_leaky
Change all relus into leaky relus for modules and submodules of net.
torchelie/nn/utils.py:296
↓ 1 callersFunctionmake_nets
()
wip/adain.py:54
↓ 1 callersMethodmake_weight_bias
(self, z, size)
torchelie/nn/batchnorm.py:186
↓ 1 callersFunctionmixup
r""" Mixes samples `x1` and `x2` with respective labels `y1` and `y2` according to MixUp :math:`\lambda \sim \text{Beta}(\alpha, \alpha)`
torchelie/datasets/__init__.py:114
↓ 1 callersFunctionnb_parameters
Counts the number of parameters of `net` Args: net (nn.Module): the net Returns: the number of params
torchelie/utils.py:204
↓ 1 callersMethodno_preact
(self)
torchelie/nn/resblock.py:317
↓ 1 callersFunctionnormal_init
Initialize a module with gaussian weights of standard deviation std Args: m (nn.Module): the module to init Returns: th
torchelie/utils.py:168
↓ 1 callersMethodnormalize
(self, x: torch.Tensor)
torchelie/models/pixcnn.py:45
↓ 1 callersFunctionparameterized_truncated_normal
(uniform: torch.Tensor, mu: float, sigma: float, a: float,
torchelie/distributions.py:93
↓ 1 callersFunctionpatch70
Patch Discriminator from pix2pix
torchelie/models/patchgan.py:107
↓ 1 callersFunctionpatch_repr
(m: nn.Module)
torchelie/nn/utils.py:13
↓ 1 callersFunctionpix2pix_256
The architecture used in `Pix2Pix <https://arxiv.org/abs/1611.07004>`_, able to train on 256x256 or 512x512 images.
torchelie/models/pix2pix.py:76
↓ 1 callersFunctionpix2pixhd_dev
()
torchelie/models/pix2pixhd.py:157
↓ 1 callersFunctionpreact_resnet18
(num_classes: int)
torchelie/models/resnet.py:299
↓ 1 callersMethodpreact_skip
(self)
torchelie/nn/resblock.py:388
↓ 1 callersMethodpredict
(self, x)
torchelie/hyper.py:224
↓ 1 callersMethodquantize
( self, x: torch.Tensor )
torchelie/nn/vq.py:119
↓ 1 callersMethodread_cache
()
torchelie/hyper.py:194
↓ 1 callersMethodread_idx
(idx_file: str)
torchelie/datasets/ms1m.py:30
↓ 1 callersFunctionrecursive_state_dict
Recursively call state_dict() on all elements contained in a list / tuple / dict so that it can be saved safely via torch.save(). Args:
torchelie/utils.py:336
↓ 1 callersMethodremove_batchnorm
(self)
torchelie/models/patchgan.py:36
↓ 1 callersMethodremove_first_batchnorm
(self)
torchelie/models/unet.py:103
↓ 1 callersFunctionremove_weight_scale
Remove a weight_scale hook previously applied on :code:`getattr(module, name)`.
torchelie/nn/utils.py:144
↓ 1 callersMethodresample_dead
(self, x)
torchelie/nn/vq.py:67
↓ 1 callersMethodreset
(self)
wip/imagenet.py:438
↓ 1 callersMethodreset
(self)
torchelie/callbacks/inspector.py:71
↓ 1 callersMethodreset
(self)
torchelie/recipes/recipebase.py:12
↓ 1 callersFunctionresidual_patch286
()
torchelie/models/snres_discr.py:112
↓ 1 callersFunctionresnet20_cifar
(num_classes: int = 10)
torchelie/models/resnet.py:230
↓ 1 callersFunctionresnet34
(num_classes: int)
torchelie/models/resnet.py:260
↓ 1 callersMethodrestore_batchnorm
Restore BatchNorm if deleted
torchelie/nn/conv.py:167
↓ 1 callersMethodrestore_shapes
(codes, indices, target_shape)
torchelie/nn/functional/vq.py:26
↓ 1 callersFunctionsample
(N, n_iter, alpha=0.01, show_every=10)
torchelie/recipes/stylegan2.py:244
↓ 1 callersMethodsample_xy
(self, x: torch.Tensor, coord_x: int, coord_y: int, temp: float)
torchelie/models/pixcnn.py:141
↓ 1 callersFunctionsave_checkpoint
(state, is_best, filename='checkpoint.pth.tar')
wip/imagenet.py:424
↓ 1 callersMethodscale
Randomly scale the image horizontally by a factor [1 - x; 1 + x] and vertically by a factor of [1 - y; 1 + y]. Args:
torchelie/transforms/differentiable.py:210
↓ 1 callersFunctionsend_to_device
Send all tensors contained in `x` to `device`, when `x` is an arbitrary nested datastructure of dicts and lists containing tensors Args:
torchelie/utils.py:306
↓ 1 callersMethodset_decoder_num_layers
(self, num: int)
torchelie/models/unet.py:91
↓ 1 callersMethodset_input_specs
(self, input_size: int = 224, in_channels: int = 3)
torchelie/models/resnet.py:215
↓ 1 callersMethodstate_dict
Returns: A state dict
torchelie/recipes/recipebase.py:125
↓ 1 callersMethodstep
Update the weights Args: closure (optional fn): a function that computes gradients
torchelie/optim.py:27
↓ 1 callersMethodstep
Update the weights Args: closure (optional fn): a function that computes gradients
torchelie/optim.py:70
↓ 1 callersMethodstep
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
torchelie/optim.py:145
↓ 1 callersMethodstep
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
torchelie/optim.py:249
↓ 1 callersMethodstep
Performs a single optimization step. Args: closure (callable, optional): A closure that reevaluates the model and
torchelie/optim.py:355
↓ 1 callersMethodstep
Step the scheduler to another iteration
torchelie/lr_scheduler.py:36
↓ 1 callersMethodstep
(self, *unused)
torchelie/lr_scheduler.py:178
↓ 1 callersMethodstylize
(self, c, s=None, ratio=0.9)
wip/adain.py:148
↓ 1 callersFunctionsz
(n)
wip/adain.py:291
↓ 1 callersFunctiontempered_softmax
Tempered softmax. Computes softmax along dimension 1 Args: x (tensor): activations t (float): temperature n_iters (i
torchelie/loss/bitempered.py:43
↓ 1 callersFunctiontest_tesorboard
()
tests/test_tensorboard_callback.py:11
↓ 1 callersMethodto_bilinear_sampling
(self)
torchelie/models/unet.py:97
↓ 1 callersMethodto_equal_lr
(self)
torchelie/nn/blocks.py:195
↓ 1 callersMethodto_equal_lr
(self, leak=0.2)
torchelie/models/snres_discr.py:74
↓ 1 callersMethodto_html
(self, cm)
torchelie/callbacks/callbacks.py:925
↓ 1 callersMethodto_resnet_style
Set the classifier architecture to avgpool-flatten-linear.
torchelie/models/classifier.py:38
↓ 1 callersMethodto_standard_arch
(self)
torchelie/models/pix2pixhd.py:34
↓ 1 callersMethodto_transposed_conv
Transform the convolution into a hopefully equivalent transposed convolution
torchelie/nn/conv.py:112
↓ 1 callersMethodto_vgg_style
Set the classifier architecture to avgpool-flatten-linear1-relu-dropout-linear2-relu-dropout-linear3, like initially done wit
torchelie/models/classifier.py:63
↓ 1 callersFunctiontrain
(train_loader, model, criterion, optimizer, epoch, args, viz)
wip/imagenet.py:339
← previousnext →301–400 of 1,230, ranked by callers