MCPcopy Create free account

hub / github.com/AtlasAnalyticsLab/AdaFisher / functions

Functions413 in github.com/AtlasAnalyticsLab/AdaFisher

↓ 13 callersMethodupdate
(self, val: float, n: int = 1)
Image_Classification/src/train.py:476
↓ 9 callersMethod__init__
(self, optimizer, step_size, gamma=0.1, last_epoch=-1)
optimizers/lr_scheduler.py:415
↓ 9 callersFunction_resnet
(arch, block, layers, **kwargs)
Image_Classification/src/models/resnet.py:238
↓ 8 callersMethod__init__
(self, dim, fn)
Image_Classification/src/models/swin.py:28
↓ 7 callersFunction_cct
(num_layers, num_heads, mlp_ratio, embedding_dim, kernel_size=3, stride=None, padding=None,
Image_Classification/src/models/cct.py:62
↓ 7 callersMethodload_state_dict
Loads the schedulers state. Arguments: state_dict (dict): scheduler state. Should be an object returned from a ca
optimizers/lr_scheduler.py:282
↓ 7 callersFunctionsmart_string_to_float
( string: str, e: str = 'could not convert string to float')
Image_Classification/src/utils/utils.py:3
↓ 7 callersMethodstate_dict
Returns the state of the scheduler as a :class:`dict`. It contains an entry for every variable in self.__dict__ which is not the opti
optimizers/lr_scheduler.py:263
↓ 7 callersMethodstep
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
optimizers/sgd.py:150
↓ 6 callersFunctionexists
(val)
Image_Classification/src/models/cct.py:10
↓ 5 callersMethod__init__
( self, img_size=224, embedding_dim=768, n_input_channels=3,
Image_Classification/src/models/cct.py:317
↓ 5 callersMethod__init__
(self, in_features, hidden_features=None, out_features=None, act_layer=nn.GELU, drop=0.)
Image_Classification/src/models/focalnet.py:16
↓ 5 callersFunction_ensure_divisible
Ensure that 'number' can be 'divisor' divisible Reference from original tensorflow repo: https://github.com/tensorflow/models/blob/master
Image_Classification/src/models/mobilenetv3.py:17
↓ 5 callersMethodlinear
Computes covariance diagonal for Linear layer. Args: h: Input activations layer: Linear layer
optimizers/AdaFisher.py:158
↓ 5 callersFunctionsmart_string_to_int
( string: str, e: str = 'could not convert string to int')
Image_Classification/src/utils/utils.py:13
↓ 4 callersFunctionMinMaxNormalization
(tensor: Tensor, epsilon: float = 1e-12)
Analysis/optimizers/AdaFisher_utils.py:8
↓ 4 callersMethod__init__
(self, inplace=False)
Image_Classification/src/models/mobilenetv3.py:49
↓ 4 callersFunction_densenet
(arch, growth_rate, block_config, num_init_features, **kwargs)
Image_Classification/src/models/densenet.py:225
↓ 4 callersMethod_format_param
Return correctly formatted lr/momentum for each param group.
optimizers/lr_scheduler.py:908
↓ 4 callersMethod_make_dense_layers
(self, block, in_planes, nblock)
Image_Classification/src/models/densenet_cifar.py:76
↓ 4 callersMethod_make_layer
(self, block, planes, num_blocks, stride)
Image_Classification/src/models/resnet_cifar.py:91
↓ 4 callersMethod_make_layer
(self, block, planes, blocks, stride=1, dilate=False)
Image_Classification/src/models/resnet.py:192
↓ 4 callersMethod_make_layer
(self, block, planes, num_blocks, stride)
Analysis/models/resnet_cifar.py:90
↓ 4 callersMethodlinear
(a, layer)
Analysis/optimizers/kfac_utils.py:121
↓ 4 callersFunctionupdate_running_avg
Update the running average of parameters with a new value using a specified beta3 coefficient. This function is designed to update the runni
Analysis/optimizers/AdaFisher_utils.py:15
↓ 3 callersMethod__init__
(self, growth_rate=32, block_config=(6, 12, 24, 16), num_init_features=64, bn_size=4, drop_ra
Image_Classification/src/models/densenet.py:166
↓ 3 callersMethod_format_param
Return correctly formatted lr/momentum for each param group.
optimizers/lr_scheduler.py:1257
↓ 3 callersFunctionconv1x1
1x1 convolution
Image_Classification/src/models/resnet.py:42
↓ 3 callersMethodconv2d
(a, layer)
optimizers/kfac_utils.py:109
↓ 3 callersMethodconv2d
(a, layer)
Analysis/optimizers/kfac_utils.py:109
↓ 3 callersFunctionconv3x3
3x3 convolution with padding
Image_Classification/src/models/resnet.py:36
↓ 3 callersMethodcreate_output_dir
(self, checkpoint: bool = False)
Image_Classification/src/train.py:248
↓ 3 callersMethodflops
(self)
Image_Classification/src/models/focalnet.py:524
↓ 3 callersMethodlinear
(a, layer)
optimizers/kfac_utils.py:121
↓ 3 callersMethodsplit_heads
Split the head vectors. This function splits the head vectors that have been concatenated (e.g. through the `merge_heads` function) i
Language_Model/GPT1.py:132
↓ 3 callersMethodtrain
(self)
Image_Classification/src/train.py:263
↓ 2 callersFunctionMinMaxNormalization
Scales tensor values to range [0,1] using min-max normalization. Args: tensor: Input tensor epsilon: Small value to prevent
optimizers/AdaFisher.py:30
↓ 2 callersMethod__call__
(cls, a, layer)
optimizers/kfac_utils.py:96
↓ 2 callersMethod__call__
Delegates computation to layer-specific methods. Args: h: Input activations layer: PyTorch layer
optimizers/AdaFisher.py:112
↓ 2 callersMethod__call__
Directly calls the instance to compute the diagonal and the full matrix of the gradient covariance matrix by delegating to layer-spec
Analysis/optimizers/AdaFisher_utils.py:238
↓ 2 callersMethod__call__
(cls, a, layer)
Analysis/optimizers/kfac_utils.py:96
↓ 2 callersMethod__init__
(self, model: Module, lr: float = 1e-3, beta: float = 0.9,
optimizers/AdaFisher.py:577
↓ 2 callersMethod__init__
(self, block, num_blocks, num_classes=10)
Image_Classification/src/models/resnet_cifar.py:76
↓ 2 callersMethod__init__
(self, block, nblocks, growth_rate=12, reduction=0.5, num_classes=10)
Image_Classification/src/models/densenet_cifar.py:42
↓ 2 callersMethod__init__
(self, block, layers, num_classes=200, zero_init_residual=False, groups=1, width_per_group=64
Image_Classification/src/models/resnet.py:140
↓ 2 callersMethod__init__
(self, block, num_blocks, num_classes=10)
Analysis/models/resnet_cifar.py:75
↓ 2 callersMethod__init__
A decoder layer. This module combines a Multi-headed Attention module and an MLP to create a layer of the transformer, with normaliza
Language_Model/GPT1.py:239
↓ 2 callersMethod_check_dim
Checks if the dimensions of a given parameter match the dimensions of its corresponding module's weights or bias. This function is cr
Analysis/optimizers/AdaFisher.py:269
↓ 2 callersFunction_extract_patches
:param x: The input feature maps. (batch_size, in_c, h, w) :param kernel_size: the kernel size of the conv filter (tuple of two elements)
optimizers/kfac_utils.py:13
↓ 2 callersFunction_extract_patches
:param x: The input feature maps. (batch_size, in_c, h, w) :param kernel_size: the kernel size of the conv filter (tuple of two elements)
Analysis/optimizers/kfac_utils.py:13
↓ 2 callersMethod_get_F_tilde
Computes the FIM for a given module's parameters. This method is called internally by the AdaFisher optimizer during the optimization
Analysis/optimizers/AdaFisher.py:229
↓ 2 callersMethod_get_split_indices
(self, num_tokens)
Language_Model/utils/wikitext2.py:133
↓ 2 callersMethod_get_split_indices_lines
(self)
Language_Model/utils/wikitext2.py:144
↓ 2 callersMethod_init_is_better
(self, mode, threshold, threshold_mode)
optimizers/lr_scheduler.py:724
↓ 2 callersMethod_step
Updates a single parameter using AdaFisher optimization step. Args: hyperparameters: Dict containing 'lr', 'beta', and '
optimizers/AdaFisher.py:597
↓ 2 callersMethod_step
Updates a single parameter using AdaFisherW optimization step. Args: hyperparameters: Dict containing 'lr', 'beta', and
optimizers/AdaFisher.py:738
↓ 2 callersMethod_step
Performs a single optimization step for one parameter tensor, applying updates calculated from gradient and Fisher information.
Analysis/optimizers/AdaFisher.py:299
↓ 2 callersFunctionaccuracy
Computes the precision@k for the specified values of k
Image_Classification/src/train.py:483
↓ 2 callersMethodbatchnorm2d
Computes covariance diagonal for BatchNorm2d layer. Args: h: Input activations layer: BatchNorm2d layer
optimizers/AdaFisher.py:178
↓ 2 callersMethodbatchnorm2d
Computes the diagonal and the full matrix of the gradient covariance matrix for a BatchNorm2d layer. Parameters: - s (Tensor
Analysis/optimizers/AdaFisher_utils.py:302
↓ 2 callersMethodbn_function
(self, inputs)
Image_Classification/src/models/densenet.py:62
↓ 2 callersMethodconv2d
Computes covariance diagonal for Conv2d layer. Args: h: Input (batch_size, in_channels, height, width) layer
optimizers/AdaFisher.py:137
↓ 2 callersMethodconv2d
Computes the diagonal and the full matrix of the gradient covariance matrix for a Conv2d layer. Parameters: - s (Tensor): Gr
Analysis/optimizers/AdaFisher_utils.py:263
↓ 2 callersFunctioncreate_mask
(window_size, displacement, upper_lower, left_right)
Image_Classification/src/models/swin.py:50
↓ 2 callersFunctiondefault
(val, d)
Image_Classification/src/models/cct.py:14
↓ 2 callersFunctiondensenet121
r"""Densenet-121 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: memory_efficie
Image_Classification/src/models/densenet.py:231
↓ 2 callersFunctionevaluate
(epoch, model, dataloader, args, mode="val")
Language_Model/run_exp.py:61
↓ 2 callersMethodget_lr
(self)
optimizers/lr_scheduler.py:174
↓ 2 callersMethodlayernorm
Computes covariance diagonal for LayerNorm layer. Args: h: Input activations layer: LayerNorm layer
optimizers/AdaFisher.py:195
↓ 2 callersMethodlayernorm
Computes the diagonal and the full matrix of the gradient covariance matrix for a LayerNorm layer. Parameters: - s (Tensor):
Analysis/optimizers/AdaFisher_utils.py:320
↓ 2 callersMethodlinear
Computes the diagonal and the full matrix of the gradient covariance matrix for a Linear layer. Parameters: - s (Tensor): Gr
Analysis/optimizers/AdaFisher_utils.py:283
↓ 2 callersMethodloss
Loss function. This function computes the loss (negative log-likelihood). Parameters ---------- log_probas (`torch.F
Language_Model/GPT1.py:369
↓ 2 callersFunctionmain_worker
(args: APNamespace)
Image_Classification/src/train.py:537
↓ 2 callersMethodreset
(self)
Image_Classification/src/train.py:470
↓ 2 callersFunctionresnet101
r"""ResNet-101 model from `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
Image_Classification/src/models/resnet.py:271
↓ 2 callersFunctionresnet50
r"""ResNet-50 model from `"Deep Residual Learning for Image Recognition" <https://arxiv.org/pdf/1512.03385.pdf>`_
Image_Classification/src/models/resnet.py:263
↓ 2 callersFunctionto_device
(tensors, device)
Language_Model/utils/torch_utils.py:17
↓ 2 callersFunctiontry_contiguous
(x)
optimizers/kfac_utils.py:6
↓ 2 callersFunctiontry_contiguous
(x)
Analysis/optimizers/kfac_utils.py:6
↓ 2 callersFunctionupdate_running_avg
Updates exponential moving average of parameters in-place. Args: new: New parameter values current: Current parameter values
optimizers/AdaFisher.py:48
↓ 2 callersFunctionupdate_running_stat
(aa, m_aa, stat_decay)
optimizers/kfac_utils.py:33
↓ 2 callersFunctionupdate_running_stat
(aa, m_aa, stat_decay)
Analysis/optimizers/kfac_utils.py:33
↓ 1 callersMethod__init__
(self, params, lr=required, momentum=0, dampening=0, weight_decay=0, nesterov=False)
optimizers/sgd.py:127
↓ 1 callersMethod__init__
(self, params, lr=required, momentum=0, dampening=0, weight_decay=0, nesterov=False)
Analysis/optimizers/sgd.py:127
↓ 1 callersMethod__setstate__
(self, state)
optimizers/sgd.py:144
↓ 1 callersMethod__setstate__
(self, state)
Analysis/optimizers/sgd.py:144
↓ 1 callersMethod_check_dim
Checks if the dimensions of a given parameter match the dimensions of its corresponding module's weights or bias. This function is cr
optimizers/AdaFisher.py:523
↓ 1 callersFunction_extract_patches
Extracts sliding window patches from input feature maps for convolution operations. Args: x: Input tensor (batch_size, in_channels,
optimizers/AdaFisher.py:61
↓ 1 callersFunction_extract_patches
Extract patches from input feature maps given a specified kernel size, stride, and padding. This function applies a sliding window approach
Analysis/optimizers/AdaFisher_utils.py:42
↓ 1 callersMethod_forward_impl
(self, x)
Image_Classification/src/models/resnet.py:216
↓ 1 callersMethod_get_F_tilde
Computes Fisher Information Matrix with regularization for parameter updates. Args: module: Neural network layer
optimizers/AdaFisher.py:497
↓ 1 callersMethod_get_closed_form_lr
(self)
optimizers/lr_scheduler.py:430
↓ 1 callersMethod_get_matrix_form_grad
:param m: the layer :param classname: the class name of the layer :return: a matrix form of the gradient. it should be a [out
optimizers/kfac.py:95
↓ 1 callersMethod_get_matrix_form_grad
:param m: the layer :param classname: the class name of the layer :return: a matrix form of the gradient. it should be a [out
Analysis/optimizers/kfac.py:95
↓ 1 callersMethod_get_natural_grad
:param m: the layer :param p_grad_mat: the gradients in matrix form :return: a list of gradients w.r.t to the parameters in
optimizers/kfac.py:109
↓ 1 callersMethod_get_natural_grad
:param m: the layer :param p_grad_mat: the gradients in matrix form :return: a list of gradients w.r.t to the parameters in
Analysis/optimizers/kfac.py:109
↓ 1 callersMethod_get_split_indices_complete
(self)
Language_Model/utils/wikitext2.py:156
↓ 1 callersMethod_initialize_weights
Initialize the weights
Image_Classification/src/models/mobilenetv3.py:306
↓ 1 callersMethod_kl_clip_and_update_grad
(self, updates, lr)
optimizers/kfac.py:131
↓ 1 callersMethod_kl_clip_and_update_grad
(self, updates, lr)
Analysis/optimizers/kfac.py:131
next →1–100 of 413, ranked by callers