Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/imrahulr/hat
/ types & classes
Types & classes
49 in github.com/imrahulr/hat
⨍
Functions
206
◇
Types & classes
49
↳
Endpoints
1
↓ 5 callers
Class
Logger
Helper class for logging. Arguments: path (str): Path to log file.
core/utils/logger.py:4
↓ 4 callers
Class
PreActResNet
Pre-activation Resnet model for TI-200 dataset.
core/models/ti_preact_resnet.py:71
↓ 4 callers
Class
PreActResNet
Pre-activation Resnet model
core/models/in_preact_resnet.py:71
↓ 4 callers
Class
PreActResNet
Pre-activation Resnet model
core/models/preact_resnet.py:71
↓ 4 callers
Class
ResNet
ResNet model Arguments: block (BasicBlock or Bottleneck): type of basic block to be used. num_blocks (list): number of blocks
core/models/resnet.py:100
↓ 3 callers
Class
NetworkBlock
Implements a network block module for WideResnets. Arguments: nb_layers (int): number of layers. in_planes (int): number of i
core/models/wideresnet.py:46
↓ 3 callers
Class
PreActResNet
PreActResNet model Arguments: num_classes (int): number of output classes. depth (int): number of layers. width (int)
core/models/preact_resnetwithswish.py:68
↓ 3 callers
Class
SmoothCrossEntropyLoss
Soft cross entropy loss with label smoothing.
core/utils/utils.py:10
↓ 3 callers
Class
Trainer
Helper class for training a deep neural network. Arguments: info (dict): dataset information. args (dict): input arguments.
core/utils/train.py:30
↓ 3 callers
Class
WideResNet
WideResNet model Arguments: num_classes (int): number of output classes. depth (int): number of layers. width (int):
core/models/wideresnetwithswish.py:97
↓ 3 callers
Class
_BlockGroup
WideResNet block group. Arguments: in_planes (int): number of input planes. out_planes (int): number of output filters.
core/models/wideresnetwithswish.py:72
↓ 2 callers
Class
SemiSupervisedCIFAR10
A dataset with auxiliary pseudo-labeled data for CIFAR10.
core/data/cifar10s.py:45
↓ 2 callers
Class
SemiSupervisedCIFAR100
A dataset with auxiliary pseudo-labeled data for CIFAR100.
core/data/cifar100s.py:44
↓ 1 callers
Class
AdversarialDatasetWithPerturbation
Torch dataset for reading examples with corresponding perturbations. Arguments: root (str): path to saved data. transform (to
core/data/utils.py:11
↓ 1 callers
Class
CosineLR
Cosine annealing LR schedule (used in Carmon et al, 2019).
core/utils/rst.py:6
↓ 1 callers
Class
FGMAttack
One step fast gradient method. Perturbs the input with gradient (not gradient sign) of the loss wrt the input. Arguments: predict (nn
core/attacks/fgsm.py:62
↓ 1 callers
Class
FGSMAttack
One step fast gradient sign method (Goodfellow et al, 2014). Arguments: predict (nn.Module): forward pass function. loss_fn (
core/attacks/fgsm.py:9
↓ 1 callers
Class
ImageNet100
core/data/imagenet100.py:16
↓ 1 callers
Class
L2APGDAttack
APGD attack (from AutoAttack) with order=L2. The attack performs nb_iter steps of adaptive size, while always staying within eps from the ini
core/attacks/apgd.py:55
↓ 1 callers
Class
L2DeepFoolAttack
DeepFool Attack with order=L2. Arguments: predict (nn.Module): forward pass function. overshoot (float): how much to overshoo
core/attacks/deepfool.py:176
↓ 1 callers
Class
L2PGDAttack
PGD Attack with order=L2 Arguments: predict (nn.Module): forward pass function. loss_fn (nn.Module): loss function. e
core/attacks/pgd.py:168
↓ 1 callers
Class
LinfAPGDAttack
APGD attack (from AutoAttack) with order=Linf. The attack performs nb_iter steps of adaptive size, while always staying within eps from the i
core/attacks/apgd.py:37
↓ 1 callers
Class
LinfDeepFoolAttack
DeepFool Attack with order=Linf. Arguments: Arguments: predict (nn.Module): forward pass function. overshoot (float): how
core/attacks/deepfool.py:153
↓ 1 callers
Class
LinfPGDAttack
PGD Attack with order=Linf Arguments: predict (nn.Module): forward pass function. loss_fn (nn.Module): loss function.
core/attacks/pgd.py:143
↓ 1 callers
Class
Normalization
Standardizes the input data. Arguments: mean (list): mean. std (float): standard deviation. Returns: (input - mea
core/models/resnet.py:6
↓ 1 callers
Class
NumpyToTensor
Transforms a numpy.ndarray to torch.Tensor.
core/utils/utils.py:158
↓ 1 callers
Class
SemiSupervisedSampler
Balanced sampling from the labeled and unlabeled data.
core/data/semisup.py:122
↓ 1 callers
Class
WATrainer
Helper class for training a deep neural network with model weight averaging (identical to Gowal et al, 2020). Arguments: info (dict):
gowal21uncovering/utils/watrain.py:29
↓ 1 callers
Class
WideResNet
WideResNet model Arguments: depth (int): number of layers. num_classes (int): number of output classes. widen_factor
core/models/wideresnet.py:71
↓ 1 callers
Class
_Block
WideResNet Block. Arguments: in_planes (int): number of input planes. out_planes (int): number of output filters. str
core/models/wideresnetwithswish.py:25
↓ 1 callers
Class
_PreActBlock
PreAct ResNet Block. Arguments: in_planes (int): number of input planes. out_planes (int): number of output filters.
core/models/preact_resnetwithswish.py:24
↓ 1 callers
Class
ctx_eval
core/utils/context.py:18
↓ 1 callers
Class
ctx_noparamgrad
core/utils/context.py:4
↓ 1 callers
Class
dotdict
eval-adv.py:173
Class
APGD
APGD attack (from AutoAttack) (Croce et al, 2020). The attack performs nb_iter steps of adaptive size, while always staying within eps from t
core/attacks/apgd.py:10
Class
Attack
Abstract base class for all attack classes. Arguments: predict (nn.Module): forward pass function. loss_fn (nn.Module): loss
core/attacks/base.py:7
Class
BasicBlock
Implements a basic block module for Resnets. Arguments: in_planes (int): number of input planes. out_planes (int): number of
core/models/resnet.py:33
Class
BasicBlock
Implements a basic block module for WideResNets. Arguments: in_planes (int): number of input planes. out_planes (int): number
core/models/wideresnet.py:10
Class
Bottleneck
Implements a basic block module with bottleneck for Resnets. Arguments: in_planes (int): number of input planes. out_planes (
core/models/resnet.py:65
Class
DeepFoolAttack
DeepFool attack. [Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Pascal Frossard, "DeepFool: a simple and accurate method to fool deep
core/attacks/deepfool.py:108
Class
LabelMixin
core/attacks/base.py:39
Class
PGDAttack
The projected gradient descent attack (Madry et al, 2017). The attack performs nb_iter steps of size eps_iter, while always staying within ep
core/attacks/pgd.py:73
Class
PreActBlock
Pre-activation version of the BasicBlock. Arguments: in_planes (int): number of input planes. planes (int): number of output
core/models/ti_preact_resnet.py:6
Class
PreActBlock
Pre-activation version of the BasicBlock for Resnets. Arguments: in_planes (int): number of input planes. planes (int): numbe
core/models/in_preact_resnet.py:6
Class
PreActBlock
Pre-activation version of the BasicBlock for Resnets. Arguments: in_planes (int): number of input planes. planes (int): numbe
core/models/preact_resnet.py:6
Class
PreActBottleneck
Pre-activation version of the original Bottleneck module. Arguments: in_planes (int): number of input planes. planes (int): n
core/models/ti_preact_resnet.py:37
Class
PreActBottleneck
Pre-activation version of the original Bottleneck module for Resnets. Arguments: in_planes (int): number of input planes. pla
core/models/in_preact_resnet.py:37
Class
PreActBottleneck
Pre-activation version of the original Bottleneck module for Resnets. Arguments: in_planes (int): number of input planes. pla
core/models/preact_resnet.py:37
Class
SemiSupervisedDataset
A dataset with auxiliary pseudo-labeled data.
core/data/semisup.py:28