SYMBOL INDEX (295 symbols across 51 files) FILE: experiments/CIFAR10-TRADES/baseline.res-pre18.TRADES.10step/config.py function add_path (line 8) | def add_path(path): class TrainingConfing (line 21) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10-TRADES/baseline.res-pre18.TRADES.10step/network.py function create_network (line 5) | def create_network(): function test (line 10) | def test(): FILE: experiments/CIFAR10-TRADES/baseline.res-pre18.TRADES.10step/trades.py function squared_l2_norm (line 9) | def squared_l2_norm(x): function l2_norm (line 14) | def l2_norm(x): function trades_loss (line 18) | def trades_loss(model, FILE: experiments/CIFAR10-TRADES/baseline.res-pre18.TRADES.10step/train_trades_cifar10.py function train (line 47) | def train(args, model, device, train_loader, optimizer, epoch, descrip_s... function adjust_learning_rate (line 83) | def adjust_learning_rate(optimizer, epoch): function main (line 96) | def main(): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-2-5/config.py function add_path (line 8) | def add_path(path): class TrainingConfing (line 21) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-2-5/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 17) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-2-5/loss.py class Hamiltonian (line 7) | class Hamiltonian(_Loss): method __init__ (line 9) | def __init__(self, layer, reg_cof = 1e-4): method forward (line 14) | def forward(self, x, p): class CrossEntropyWithWeightPenlty (line 21) | class CrossEntropyWithWeightPenlty(_Loss): method __init__ (line 22) | def __init__(self, module, DEVICE, reg_cof = 1e-4): method __call__ (line 29) | def __call__(self, pred, label): function cal_l2_norm (line 37) | def cal_l2_norm(layer: torch.nn.Module): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-2-5/network.py class PreActBlock (line 12) | class PreActBlock(nn.Module): method __init__ (line 16) | def __init__(self, in_planes, planes, stride=1): method forward (line 28) | def forward(self, x): class PreActResNet (line 37) | class PreActResNet(nn.Module): method __init__ (line 39) | def __init__(self, block, num_blocks, num_classes=10): method _make_layer (line 58) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 68) | def forward(self, x): class GlobalpoolFC (line 82) | class GlobalpoolFC(nn.Module): method __init__ (line 84) | def __init__(self, num_in, num_class): method forward (line 89) | def forward(self, x): function PreActResNet18 (line 96) | def PreActResNet18(): function PreActResNet34 (line 100) | def PreActResNet34(): class PreActBottleneck (line 104) | class PreActBottleneck(nn.Module): method __init__ (line 108) | def __init__(self, in_planes, planes, stride=1): method forward (line 122) | def forward(self, x): function create_network (line 131) | def create_network(): function test (line 135) | def test(): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-2-5/training_function.py class FastGradientLayerOneTrainer (line 14) | class FastGradientLayerOneTrainer(object): method __init__ (line 16) | def __init__(self, Hamiltonian_func, param_optimizer, method step (line 24) | def step(self, inp, p, eta): function train_one_epoch (line 59) | def train_one_epoch(net, batch_generator, optimizer, FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-3-4/config.py function add_path (line 9) | def add_path(path): class TrainingConfing (line 22) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-3-4/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 17) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-3-4/loss.py class Hamiltonian (line 7) | class Hamiltonian(_Loss): method __init__ (line 9) | def __init__(self, layer, reg_cof = 1e-4): method forward (line 15) | def forward(self, x, p): class CrossEntropyWithWeightPenlty (line 23) | class CrossEntropyWithWeightPenlty(_Loss): method __init__ (line 24) | def __init__(self, module, DEVICE, reg_cof = 1e-4): method __call__ (line 31) | def __call__(self, pred, label): function cal_l2_norm (line 40) | def cal_l2_norm(layer: torch.nn.Module): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-3-4/network.py class PreActBlock (line 12) | class PreActBlock(nn.Module): method __init__ (line 16) | def __init__(self, in_planes, planes, stride=1): method forward (line 28) | def forward(self, x): class PreActResNet (line 37) | class PreActResNet(nn.Module): method __init__ (line 39) | def __init__(self, block, num_blocks, num_classes=10): method _make_layer (line 58) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 68) | def forward(self, x): class GlobalpoolFC (line 82) | class GlobalpoolFC(nn.Module): method __init__ (line 84) | def __init__(self, num_in, num_class): method forward (line 89) | def forward(self, x): function PreActResNet18 (line 96) | def PreActResNet18(): function PreActResNet34 (line 100) | def PreActResNet34(): class PreActBottleneck (line 104) | class PreActBottleneck(nn.Module): method __init__ (line 108) | def __init__(self, in_planes, planes, stride=1): method forward (line 122) | def forward(self, x): function create_network (line 131) | def create_network(): function test (line 135) | def test(): FILE: experiments/CIFAR10-TRADES/pre-res18.TRADES-YOPO-3-4/training_function.py class FastGradientLayerOneTrainer (line 14) | class FastGradientLayerOneTrainer(object): method __init__ (line 16) | def __init__(self, Hamiltonian_func, param_optimizer, method step (line 24) | def step(self, inp, p, eta): function train_one_epoch (line 54) | def train_one_epoch(net, batch_generator, optimizer, FILE: experiments/CIFAR10/pre-res18.pgd10/config.py function add_path (line 8) | def add_path(path): class TrainingConfing (line 21) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10/pre-res18.pgd10/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 19) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/CIFAR10/pre-res18.pgd10/network.py class PreActBlock (line 12) | class PreActBlock(nn.Module): method __init__ (line 16) | def __init__(self, in_planes, planes, stride=1): method forward (line 28) | def forward(self, x): class PreActResNet (line 37) | class PreActResNet(nn.Module): method __init__ (line 39) | def __init__(self, block, num_blocks, num_classes=10): method _make_layer (line 58) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 68) | def forward(self, x): class GlobalpoolFC (line 93) | class GlobalpoolFC(nn.Module): method __init__ (line 95) | def __init__(self, num_in, num_class): method forward (line 100) | def forward(self, x): function PreActResNet18 (line 107) | def PreActResNet18(): function PreActResNet34 (line 111) | def PreActResNet34(): class PreActBottleneck (line 115) | class PreActBottleneck(nn.Module): method __init__ (line 119) | def __init__(self, in_planes, planes, stride=1): method forward (line 133) | def forward(self, x): function create_network (line 142) | def create_network(): function test (line 146) | def test(): FILE: experiments/CIFAR10/pre-res18.yopo-5-3/config.py function add_path (line 9) | def add_path(path): class TrainingConfing (line 22) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10/pre-res18.yopo-5-3/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 19) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/CIFAR10/pre-res18.yopo-5-3/loss.py class Hamiltonian (line 7) | class Hamiltonian(_Loss): method __init__ (line 9) | def __init__(self, layer, reg_cof = 1e-4): method forward (line 15) | def forward(self, x, p): class CrossEntropyWithWeightPenlty (line 28) | class CrossEntropyWithWeightPenlty(_Loss): method __init__ (line 29) | def __init__(self, module, DEVICE, reg_cof = 1e-4): method __call__ (line 37) | def __call__(self, pred, label): function cal_l2_norm (line 49) | def cal_l2_norm(layer: torch.nn.Module): FILE: experiments/CIFAR10/pre-res18.yopo-5-3/network.py class PreActBlock (line 12) | class PreActBlock(nn.Module): method __init__ (line 16) | def __init__(self, in_planes, planes, stride=1): method forward (line 28) | def forward(self, x): class PreActResNet (line 37) | class PreActResNet(nn.Module): method __init__ (line 39) | def __init__(self, block, num_blocks, num_classes=10): method _make_layer (line 58) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 68) | def forward(self, x): class GlobalpoolFC (line 82) | class GlobalpoolFC(nn.Module): method __init__ (line 84) | def __init__(self, num_in, num_class): method forward (line 89) | def forward(self, x): function PreActResNet18 (line 96) | def PreActResNet18(): function PreActResNet34 (line 100) | def PreActResNet34(): class PreActBottleneck (line 104) | class PreActBottleneck(nn.Module): method __init__ (line 108) | def __init__(self, in_planes, planes, stride=1): method forward (line 122) | def forward(self, x): function create_network (line 131) | def create_network(): function test (line 135) | def test(): FILE: experiments/CIFAR10/pre-res18.yopo-5-3/training_function.py class FastGradientLayerOneTrainer (line 13) | class FastGradientLayerOneTrainer(object): method __init__ (line 15) | def __init__(self, Hamiltonian_func, param_optimizer, method step (line 23) | def step(self, inp, p, eta): function train_one_epoch (line 63) | def train_one_epoch(net, batch_generator, optimizer, FILE: experiments/CIFAR10/wide34.natural/config.py function add_path (line 8) | def add_path(path): class TrainingConfing (line 21) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10/wide34.natural/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 19) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/CIFAR10/wide34.natural/network.py function create_network (line 4) | def create_network(): function test (line 8) | def test(): FILE: experiments/CIFAR10/wide34.pgd10/config.py function add_path (line 8) | def add_path(path): class TrainingConfing (line 21) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10/wide34.pgd10/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 19) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/CIFAR10/wide34.pgd10/network.py function create_network (line 4) | def create_network(): function test (line 8) | def test(): FILE: experiments/CIFAR10/wide34.yopo-5-3/config.py function add_path (line 9) | def add_path(path): class TrainingConfing (line 22) | class TrainingConfing(TrainingConfigBase): FILE: experiments/CIFAR10/wide34.yopo-5-3/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 19) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/CIFAR10/wide34.yopo-5-3/loss.py class Hamiltonian (line 7) | class Hamiltonian(_Loss): method __init__ (line 9) | def __init__(self, layer, reg_cof = 1e-4): method forward (line 15) | def forward(self, x, p): class CrossEntropyWithWeightPenlty (line 28) | class CrossEntropyWithWeightPenlty(_Loss): method __init__ (line 29) | def __init__(self, module, DEVICE, reg_cof = 1e-4): method __call__ (line 37) | def __call__(self, pred, label): function cal_l2_norm (line 49) | def cal_l2_norm(layer: torch.nn.Module): FILE: experiments/CIFAR10/wide34.yopo-5-3/network.py function create_network (line 4) | def create_network(): function test (line 8) | def test(): FILE: experiments/CIFAR10/wide34.yopo-5-3/training_function.py class FastGradientLayerOneTrainer (line 13) | class FastGradientLayerOneTrainer(object): method __init__ (line 15) | def __init__(self, Hamiltonian_func, param_optimizer, method step (line 23) | def step(self, inp, p, eta): function train_one_epoch (line 63) | def train_one_epoch(net, batch_generator, optimizer, FILE: experiments/MNIST/YOPO-5-10/config.py function add_path (line 8) | def add_path(path): class TrainingConfing (line 24) | class TrainingConfing(TrainingConfigBase): FILE: experiments/MNIST/YOPO-5-10/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 14) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/MNIST/YOPO-5-10/loss.py class Hamiltonian (line 7) | class Hamiltonian(_Loss): method __init__ (line 9) | def __init__(self, layer, reg_cof = 1e-4): method forward (line 15) | def forward(self, x, p): class CrossEntropyWithWeightPenlty (line 23) | class CrossEntropyWithWeightPenlty(_Loss): method __init__ (line 24) | def __init__(self, module, DEVICE, reg_cof = 1e-4): method __call__ (line 31) | def __call__(self, pred, label): function cal_l2_norm (line 38) | def cal_l2_norm(layer: torch.nn.Module): FILE: experiments/MNIST/YOPO-5-10/network.py class SmallCNN (line 6) | class SmallCNN(nn.Module): method __init__ (line 7) | def __init__(self, drop=0.5): method forward (line 54) | def forward(self, input): function create_network (line 63) | def create_network(): function test (line 67) | def test(): FILE: experiments/MNIST/YOPO-5-10/training_function.py class FastGradientLayerOneTrainer (line 13) | class FastGradientLayerOneTrainer(object): method __init__ (line 15) | def __init__(self, Hamiltonian_func, param_optimizer, method step (line 23) | def step(self, inp, p, eta): function train_one_epoch (line 63) | def train_one_epoch(net, batch_generator, optimizer, FILE: experiments/MNIST/pgd40/config.py function add_path (line 7) | def add_path(path): class TrainingConfing (line 20) | class TrainingConfing(TrainingConfigBase): FILE: experiments/MNIST/pgd40/dataset.py function create_train_dataset (line 5) | def create_train_dataset(batch_size = 128, root = '../data'): function create_test_dataset (line 14) | def create_test_dataset(batch_size = 128, root = '../data'): FILE: experiments/MNIST/pgd40/network.py function create_network (line 5) | def create_network(): function test (line 9) | def test(): FILE: lib/attack/attack_base.py class AttackBase (line 5) | class AttackBase(metaclass=ABCMeta): method attack (line 7) | def attack(self, net, inp, label, target = None): method to (line 17) | def to(self, device): function clip_eta (line 22) | def clip_eta(eta, norm, eps, DEVICE = torch.device('cuda:0')): function test_clip (line 52) | def test_clip(): FILE: lib/attack/pgd.py class IPGD (line 16) | class IPGD(AttackBase): method __init__ (line 23) | def __init__(self, eps = 6 / 255.0, sigma = 3 / 255.0, nb_iter = 20, method single_attack (line 43) | def single_attack(self, net, inp, label, eta, target = None): method attack (line 81) | def attack(self, net, inp, label, target = None): method to (line 105) | def to(self, device): function test_IPGD (line 111) | def test_IPGD(): FILE: lib/base_model/cifar_resnet18.py class BasicBlock (line 16) | class BasicBlock(nn.Module): method __init__ (line 19) | def __init__(self, in_planes, planes, stride=1): method forward (line 33) | def forward(self, x): class Bottleneck (line 41) | class Bottleneck(nn.Module): method __init__ (line 44) | def __init__(self, in_planes, planes, stride=1): method forward (line 60) | def forward(self, x): class ResNet (line 69) | class ResNet(nn.Module): method __init__ (line 70) | def __init__(self, block, num_blocks, num_classes=10): method _make_layer (line 82) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 90) | def forward(self, x): function cifar_resnet18 (line 102) | def cifar_resnet18(*args, **kargs): function ResNet34 (line 105) | def ResNet34(): function ResNet50 (line 108) | def ResNet50(): function ResNet101 (line 111) | def ResNet101(): function ResNet152 (line 114) | def ResNet152(): function test (line 118) | def test(): FILE: lib/base_model/network.py class PreActBlock (line 12) | class PreActBlock(nn.Module): method __init__ (line 16) | def __init__(self, in_planes, planes, stride=1): method forward (line 28) | def forward(self, x): class PreActResNet (line 37) | class PreActResNet(nn.Module): method __init__ (line 39) | def __init__(self, block, num_blocks, num_classes=10): method _make_layer (line 58) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 68) | def forward(self, x): class GlobalpoolFC (line 93) | class GlobalpoolFC(nn.Module): method __init__ (line 95) | def __init__(self, num_in, num_class): method forward (line 100) | def forward(self, x): function PreActResNet18 (line 107) | def PreActResNet18(): function PreActResNet34 (line 111) | def PreActResNet34(): class PreActBottleneck (line 115) | class PreActBottleneck(nn.Module): method __init__ (line 119) | def __init__(self, in_planes, planes, stride=1): method forward (line 133) | def forward(self, x): function create_network (line 142) | def create_network(): function test (line 146) | def test(): FILE: lib/base_model/preact_resnet.py class PreActBlock (line 11) | class PreActBlock(nn.Module): method __init__ (line 15) | def __init__(self, in_planes, planes, stride=1): method forward (line 27) | def forward(self, x): class PreActResNet (line 36) | class PreActResNet(nn.Module): method __init__ (line 38) | def __init__(self, block, num_blocks, num_classes=10): method _make_layer (line 58) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 68) | def forward(self, x): class GlobalpoolFC (line 90) | class GlobalpoolFC(nn.Module): method __init__ (line 92) | def __init__(self, num_in, num_class): method forward (line 97) | def forward(self, x): function PreActResNet18 (line 104) | def PreActResNet18(): function PreActResNet34 (line 108) | def PreActResNet34(): class PreActBottleneck (line 112) | class PreActBottleneck(nn.Module): method __init__ (line 116) | def __init__(self, in_planes, planes, stride=1): method forward (line 130) | def forward(self, x): function test (line 140) | def test(): FILE: lib/base_model/small_cnn.py class SmallCNN (line 14) | class SmallCNN(nn.Module): method __init__ (line 15) | def __init__(self, drop=0.5): method forward (line 62) | def forward(self, input): function create_network (line 71) | def create_network(): function test (line 75) | def test(): FILE: lib/base_model/wide_resnet.py class BasicBlock (line 16) | class BasicBlock(nn.Module): method __init__ (line 18) | def __init__(self, in_planes, out_planes, stride, dropRate=0.0): method forward (line 33) | def forward(self, x): class NetworkBlock (line 45) | class NetworkBlock(nn.Module): method __init__ (line 46) | def __init__(self, nb_layers, in_planes, out_planes, block, stride, dr... method _make_layer (line 50) | def _make_layer(self, block, in_planes, out_planes, nb_layers, stride,... method forward (line 56) | def forward(self, x): class WideResNet (line 60) | class WideResNet(nn.Module): method __init__ (line 61) | def __init__(self, depth=28, num_classes=10, widen_factor=10, dropRate... method forward (line 105) | def forward(self, x, ret_cls1=True): function create_network (line 121) | def create_network(): FILE: lib/training/config.py class TrainingConfigBase (line 8) | class TrainingConfigBase(metaclass=ABCMeta): method abs_current_dir (line 15) | def abs_current_dir(self): method log_dir (line 19) | def log_dir(self): method model_dir (line 25) | def model_dir(self): method lib_dir (line 34) | def lib_dir(self): method num_epochs (line 39) | def num_epochs(self): method val_interval (line 43) | def val_interval(self): method create_optimizer (line 51) | def create_optimizer(self, params) -> torch.optim.Optimizer: method create_lr_scheduler (line 59) | def create_lr_scheduler(self, optimizer:torch.optim.Optimizer) -> torc... method create_loss_function (line 63) | def create_loss_function(self) -> torch.nn.modules.loss._Loss: method create_attack_method (line 67) | def create_attack_method(self, *inputs): method create_evaluation_attack_method (line 76) | def create_evaluation_attack_method(self, *inputs): class SGDOptimizerMaker (line 86) | class SGDOptimizerMaker(object): method __init__ (line 88) | def __init__(self, lr = 0.1, momentum = 0.9, weight_decay = 1e-4): method __call__ (line 93) | def __call__(self, params): class PieceWiseConstantLrSchedulerMaker (line 97) | class PieceWiseConstantLrSchedulerMaker(object): method __init__ (line 99) | def __init__(self, milestones:List[int], gamma:float = 0.1): method __call__ (line 103) | def __call__(self, optimizer): class IPGDAttackMethodMaker (line 106) | class IPGDAttackMethodMaker(object): method __init__ (line 108) | def __init__(self, eps, sigma, nb_iters, norm, mean, std): method __call__ (line 116) | def __call__(self, DEVICE): class LambdaLrSchedulerMaker (line 124) | class LambdaLrSchedulerMaker(object): method __init__ (line 127) | def __init__(self, func, last_epoch = -1): method __call__ (line 133) | def __call__(self, parameters): FILE: lib/training/train.py function train_one_epoch (line 12) | def train_one_epoch(net, batch_generator, optimizer, function eval_one_epoch (line 72) | def eval_one_epoch(net, batch_generator, DEVICE=torch.device('cuda:0'),... FILE: lib/utils/misc.py function torch_accuracy (line 6) | def torch_accuracy(output, target, topk=(1,)) -> List[torch.Tensor]: class AvgMeter (line 29) | class AvgMeter(object): method __init__ (line 35) | def __init__(self, name='No name'): method reset (line 39) | def reset(self): method update (line 45) | def update(self, mean_var, count=1): function save_args (line 55) | def save_args(args, save_dir = None): function mkdir (line 68) | def mkdir(path): function save_checkpoint (line 73) | def save_checkpoint(now_epoch, net, optimizer, lr_scheduler, file_name): function load_checkpoint (line 85) | def load_checkpoint(file_name, net = None, optimizer = None, lr_schedule... function make_symlink (line 104) | def make_symlink(source, link_name): function add_path (line 118) | def add_path(path):