SYMBOL INDEX (337 symbols across 62 files) FILE: algorithms/algo.py function get_noise_multiplier (line 25) | def get_noise_multiplier( class BaseAlgo (line 77) | class BaseAlgo(): method __init__ (line 78) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_model (line 112) | def get_model(self): method save_model (line 173) | def save_model(self): method get_opt (line 181) | def get_opt(self): method get_match_function (line 194) | def get_match_function(self, inferred_match, phi): method get_match_function_batch (line 216) | def get_match_function_batch(self, batch_idx): method get_test_accuracy (line 239) | def get_test_accuracy(self, case): method get_dp_noise (line 279) | def get_dp_noise(self): FILE: algorithms/csd.py class CSD (line 21) | class CSD(BaseAlgo): method __init__ (line 22) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method forward (line 47) | def forward(self, x, y, di, eval_case=0): method epoch_callback (line 76) | def epoch_callback(self, nepoch, final=False): method train (line 80) | def train(self): method get_test_accuracy (line 142) | def get_test_accuracy(self, case): method save_model (line 167) | def save_model(self): FILE: algorithms/dann.py class DANN (line 22) | class DANN(BaseAlgo): method __init__ (line 23) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method train (line 53) | def train(self): FILE: algorithms/erm.py class Erm (line 20) | class Erm(BaseAlgo): method __init__ (line 21) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method train (line 25) | def train(self): FILE: algorithms/erm_match.py class ErmMatch (line 21) | class ErmMatch(BaseAlgo): method __init__ (line 22) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method train (line 27) | def train(self): FILE: algorithms/hybrid.py class Hybrid (line 22) | class Hybrid(BaseAlgo): method __init__ (line 23) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method save_model_erm_phase (line 30) | def save_model_erm_phase(self, run): method init_erm_phase (line 38) | def init_erm_phase(self): method train (line 93) | def train(self): FILE: algorithms/irm.py class Irm (line 20) | class Irm(BaseAlgo): method __init__ (line 21) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method train (line 25) | def train(self): FILE: algorithms/match_dg.py class MatchDG (line 22) | class MatchDG(BaseAlgo): method __init__ (line 23) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method train (line 31) | def train(self): method save_model_ctr_phase (line 38) | def save_model_ctr_phase(self, epoch): method save_model_erm_phase (line 42) | def save_model_erm_phase(self, run): method init_erm_phase (line 50) | def init_erm_phase(self): method train_ctr_phase (line 111) | def train_ctr_phase(self): method train_erm_phase (line 271) | def train_erm_phase(self): FILE: algorithms/mmd.py class MMD (line 21) | class MMD(BaseAlgo): method __init__ (line 22) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method my_cdist (line 39) | def my_cdist(self, x1, x2): method gaussian_kernel (line 47) | def gaussian_kernel(self, x, y, gamma=[0.001, 0.01, 0.1, 1, 10, 100, method mmd (line 57) | def mmd(self, x, y): method mmd_regularization (line 76) | def mmd_regularization(self, features, d, nmb): method train (line 85) | def train(self): FILE: data/adult_loader.py class Adult (line 18) | class Adult(BaseDataLoader): method __init__ (line 19) | def __init__(self, args, list_train_domains, root, transform=None, dat... method _get_data (line 24) | def _get_data(self): FILE: data/chestxray_loader.py class ChestXRay (line 18) | class ChestXRay(BaseDataLoader): method __init__ (line 19) | def __init__(self, args, list_train_domains, root, transform=None, dat... method _get_data (line 24) | def _get_data(self): FILE: data/chestxray_loader_aug.py class ChestXRayAug (line 18) | class ChestXRayAug(BaseDataLoader): method __init__ (line 19) | def __init__(self, args, list_domains, root, transform=None, data_case... method __getitem__ (line 24) | def __getitem__(self, index): method _get_data (line 36) | def _get_data(self): FILE: data/chestxray_loader_match_eval.py class ChestXRayAugEval (line 18) | class ChestXRayAugEval(BaseDataLoader): method __init__ (line 19) | def __init__(self, args, list_domains, root, transform=None, data_case... method _get_data (line 24) | def _get_data(self): FILE: data/data_gen_domainbed.py function generate_rotated_domain_data (line 20) | def generate_rotated_domain_data(imgs, labels, data_case, dataset, indic... FILE: data/data_gen_mnist.py function generate_rotated_domain_data (line 21) | def generate_rotated_domain_data(imgs, labels, data_case, dataset, indic... FILE: data/data_loader.py class BaseDataLoader (line 8) | class BaseDataLoader(data_utils.Dataset): method __init__ (line 9) | def __init__(self, args, list_domains, root, transform=None, data_case... method __len__ (line 28) | def __len__(self): method __getitem__ (line 31) | def __getitem__(self, index): method get_size (line 42) | def get_size(self): method get_item_spur (line 45) | def get_item_spur(self, index): FILE: data/mnist_loader.py class MnistRotated (line 15) | class MnistRotated(BaseDataLoader): method __init__ (line 16) | def __init__(self, args, list_domains, mnist_subset, root, transform=N... method _get_data (line 24) | def _get_data(self): FILE: data/mnist_loader_match_eval.py class MnistRotatedAugEval (line 15) | class MnistRotatedAugEval(BaseDataLoader): method __init__ (line 16) | def __init__(self, args, list_domains, mnist_subset, root, transform=N... method _get_data (line 24) | def _get_data(self): FILE: data/mnist_loader_match_eval_spur.py class MnistRotatedAugEval (line 15) | class MnistRotatedAugEval(BaseDataLoader): method __init__ (line 16) | def __init__(self, args, list_domains, mnist_subset, root, transform=N... method _get_data (line 24) | def _get_data(self): FILE: data/mnist_loader_spur.py class MnistRotated (line 15) | class MnistRotated(BaseDataLoader): method __init__ (line 16) | def __init__(self, args, list_domains, mnist_subset, root, transform=N... method _get_data (line 24) | def _get_data(self): FILE: data/pacs_loader.py class PACS (line 18) | class PACS(BaseDataLoader): method __init__ (line 19) | def __init__(self, args, list_domains, root, transform=None, data_case... method _get_data (line 24) | def _get_data(self): FILE: data/pacs_loader_aug.py class PACSAug (line 18) | class PACSAug(BaseDataLoader): method __init__ (line 19) | def __init__(self, args, list_domains, root, transform=None, data_case... method __getitem__ (line 24) | def __getitem__(self, index): method _get_data (line 36) | def _get_data(self): FILE: data/pacs_loader_match_eval.py class PACSAugEval (line 18) | class PACSAugEval(BaseDataLoader): method __init__ (line 19) | def __init__(self, args, list_domains, root, transform=None, data_case... method _get_data (line 24) | def _get_data(self): FILE: data/slab_loader.py class SlabData (line 22) | class SlabData(BaseDataLoader): method __init__ (line 23) | def __init__(self, args, list_domains, root, transform=None, data_case... method _get_data (line 58) | def _get_data(self, domain_size, data_dim, total_slabs, spur_probs, sl... FILE: data/slab_loader_spur.py class SlabData (line 25) | class SlabData(BaseDataLoader): method __init__ (line 26) | def __init__(self, args, list_train_domains, root, transform=None, dat... method _get_data (line 58) | def _get_data(self, domain_size, data_dim, total_slabs, spur_probs, sl... FILE: evaluation/attribute_attack.py class SpurCorrDataLoader (line 35) | class SpurCorrDataLoader(data_utils.Dataset): method __init__ (line 36) | def __init__(self, dataloader): method __len__ (line 47) | def __len__(self): method __getitem__ (line 50) | def __getitem__(self, index): class AttributeAttack (line 60) | class AttributeAttack(BaseEval): method __init__ (line 62) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_spur_logits (line 67) | def get_spur_logits(self): method get_logits (line 132) | def get_logits(self): method get_metric_eval (line 189) | def get_metric_eval(self): FILE: evaluation/base_eval.py class BaseEval (line 19) | class BaseEval(): method __init__ (line 20) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_model (line 60) | def get_model(self, run_matchdg_erm=0): method load_model (line 124) | def load_model(self, run_matchdg_erm): method forward (line 152) | def forward(self, x_e): method get_logits (line 163) | def get_logits(self): method get_metric_eval (line 203) | def get_metric_eval(self): FILE: evaluation/feat_eval.py class FeatEval (line 22) | class FeatEval(BaseEval): method __init__ (line 24) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_match_function_batch (line 27) | def get_match_function_batch(self, batch_idx): method get_metric_eval (line 49) | def get_metric_eval(self): FILE: evaluation/logit_hist.py class LogitHist (line 39) | class LogitHist(BaseEval): method __init__ (line 41) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_loss (line 45) | def get_loss(self): method get_metric_eval (line 83) | def get_metric_eval(self): FILE: evaluation/match_eval.py class MatchEval (line 20) | class MatchEval(BaseEval): method __init__ (line 22) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_metric_eval (line 25) | def get_metric_eval(self): FILE: evaluation/per_domain_acc.py class PerDomainAcc (line 20) | class PerDomainAcc(BaseEval): method __init__ (line 22) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_metric_eval (line 25) | def get_metric_eval(self): FILE: evaluation/privacy_attack.py class PrivacyAttack (line 37) | class PrivacyAttack(BaseEval): method __init__ (line 39) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_metric_eval (line 44) | def get_metric_eval(self): FILE: evaluation/privacy_entropy.py class PrivacyEntropy (line 37) | class PrivacyEntropy(BaseEval): method __init__ (line 39) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_label_logits (line 44) | def get_label_logits(self): method create_attack_data (line 93) | def create_attack_data(self, train_data, test_data, sample_size, case=... method eval_entropy_attack (line 117) | def eval_entropy_attack(self, data, threshold_data, scale=1.0, case='t... method get_metric_eval (line 182) | def get_metric_eval(self): FILE: evaluation/privacy_loss_attack.py class PrivacyLossAttack (line 37) | class PrivacyLossAttack(BaseEval): method __init__ (line 39) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_ce_loss (line 44) | def get_ce_loss(self): method create_attack_data (line 110) | def create_attack_data(self, train_data, test_data, sample_size, case=... method create_attack_data_true_obj (line 135) | def create_attack_data_true_obj(self, train_data, test_data, sample_si... method eval_entropy_attack (line 195) | def eval_entropy_attack(self, data, threshold_data, scale=1.0, case='t... method get_metric_eval (line 247) | def get_metric_eval(self): FILE: evaluation/slab_feat_eval.py function sim_matrix (line 22) | def sim_matrix(a, b, eps=1e-8): class SlabFeatEval (line 32) | class SlabFeatEval(BaseEval): method __init__ (line 34) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_metric_eval (line 37) | def get_metric_eval(self): FILE: evaluation/t_sne.py class TSNE (line 20) | class TSNE(BaseEval): method __init__ (line 22) | def __init__(self, args, train_dataset, val_dataset, test_dataset, bas... method get_metric_eval (line 25) | def get_metric_eval(self): FILE: misc_scripts/logit_plot_slab.py function get_logits (line 33) | def get_logits(model, loader, device, label=1): FILE: models/alexnet.py class Id (line 26) | class Id(nn.Module): method __init__ (line 27) | def __init__(self): method forward (line 30) | def forward(self, x): class AlexNet (line 34) | class AlexNet(nn.Module): method __init__ (line 35) | def __init__(self, num_classes=1000, dropout=True): method initialize_params (line 69) | def initialize_params(self): method forward (line 76) | def forward(self, x): function alexnet (line 83) | def alexnet(model_name, classes, fc_layer, num_ch, pre_trained, os_env): FILE: models/densenet.py class Identity (line 9) | class Identity(nn.Module): method __init__ (line 10) | def __init__(self,n_inputs): method forward (line 14) | def forward(self, x): function get_densenet (line 18) | def get_densenet(model_name, classes, fc_layer, num_ch, pre_trained, os_... FILE: models/domain_bed_mnist.py class DomainBed (line 12) | class DomainBed(torch.nn.Module): method __init__ (line 14) | def __init__(self, num_ch, fc_layer): method forward (line 34) | def forward(self, x): FILE: models/fc.py class FC (line 11) | class FC(torch.nn.Module): method __init__ (line 13) | def __init__(self, classes, fc_layer): method forward (line 31) | def forward(self, x): FILE: models/lenet.py class LeNet5 (line 11) | class LeNet5(torch.nn.Module): method __init__ (line 13) | def __init__(self): method forward (line 41) | def forward(self, x): FILE: models/resnet.py class GroupNorm (line 8) | class GroupNorm(torch.nn.GroupNorm): method __init__ (line 9) | def __init__(self, num_channels, num_groups=32, **kwargs): class Identity (line 13) | class Identity(nn.Module): method __init__ (line 14) | def __init__(self,n_inputs): method forward (line 18) | def forward(self, x): function get_resnet (line 22) | def get_resnet(model_name, classes, fc_layer, num_ch, pre_trained, dp_no... FILE: models/slab.py class SlabClf (line 10) | class SlabClf(nn.Module): method __init__ (line 11) | def __init__(self, inp_shape, out_shape, fc_layer): method forward (line 35) | def forward(self, x): FILE: reproduce_scripts/cxray_plot.py function get_base_dir (line 7) | def get_base_dir(test_domain, dataset, metric): FILE: reproduce_scripts/mnist_plot.py function get_base_dir (line 7) | def get_base_dir(train_case, test_case, dataset, metric): FILE: test_slab.py function get_logits (line 34) | def get_logits(model, loader, device, label=1): FILE: utils/attribute_attack.py function to_onehot (line 24) | def to_onehot(inp): function my_attack_model (line 30) | def my_attack_model(features, labels, mode, params): function mia (line 85) | def mia(X_att_train, y_att_train, X_att_test, y_att_test, my_feature_col... FILE: utils/bnlearn_data.py function to_onehot (line 10) | def to_onehot(inp): function split_list (line 15) | def split_list(a_list): function load_dnn_prob (line 20) | def load_dnn_prob(train_prob, test_prob, features): function load_bnet_prob (line 104) | def load_bnet_prob(dataset_name, num_examples, output_name, dist): function load_data (line 151) | def load_data(dataset_name, num_examples, output_name, noise): function train_input_fn (line 180) | def train_input_fn(features, labels, batch_size): function eval_input_fn (line 194) | def eval_input_fn(features, labels, batch_size): FILE: utils/helper.py function slab_batch_process (line 19) | def slab_batch_process(x, y, d, o): function t_sne_plot (line 34) | def t_sne_plot(X): function classifier (line 39) | def classifier(x_e, phi, w): function erm_loss (line 42) | def erm_loss(temp_logits, target_label): function compute_irm_penalty (line 46) | def compute_irm_penalty( logits, target_label, cuda): function cosine_similarity (line 55) | def cosine_similarity( x1, x2 ): function l1_dist (line 59) | def l1_dist(x1, x2): function l2_dist (line 78) | def l2_dist(x1, x2): function embedding_dist (line 97) | def embedding_dist(x1, x2, pos_metric, tau=0.05, xent=False): function get_dataloader (line 167) | def get_dataloader(args, run, domains, data_case, eval_case, kwargs): FILE: utils/match_function.py function init_data_match_dict (line 22) | def init_data_match_dict(args, keys, vals, variation): function get_matched_pairs (line 43) | def get_matched_pairs(args, cuda, train_dataset, domain_size, total_doma... FILE: utils/privacy_attack.py function to_onehot (line 24) | def to_onehot(inp): function my_attack_model (line 30) | def my_attack_model(features, labels, mode, params): function mia (line 85) | def mia(X_att_train, y_att_train, X_att_test, y_att_test, my_feature_col... FILE: utils/scripts/data_utils.py function msd (line 33) | def msd(x, r=3): function _get_dataloaders (line 36) | def _get_dataloaders(trd, ted, bs, pm=True, shuffle=True): function get_cifar10_models (line 41) | def get_cifar10_models(device=None, pretrained=True): function plot_decision_boundary (line 61) | def plot_decision_boundary(dl, model, c1, c2, ax=None, print_info=True): function get_binary_datasets (line 84) | def get_binary_datasets(X, Y, y1, y2, image_width=28, use_cnn=False): function get_binary_loader (line 95) | def get_binary_loader(dl, y1, y2): function get_mnist (line 100) | def get_mnist(fpath=DOWNLOAD_DIR, flatten=False, binarize=False, normali... function get_mnist_dl (line 125) | def get_mnist_dl(fpath=DOWNLOAD_DIR, to_np=False, bs=128, pm=False, shuf... function get_cifar (line 132) | def get_cifar(fpath=DOWNLOAD_DIR, use_cifar10=False, flatten_data=False,... function get_cifar_dl (line 180) | def get_cifar_dl(fpath=DOWNLOAD_DIR, use_cifar10=False, bs=128, shuffle=... function get_cifar_np (line 188) | def get_cifar_np(fpath=DOWNLOAD_DIR, use_cifar10=False, flatten_data=Fal... FILE: utils/scripts/ensemble.py class Ensemble (line 17) | class Ensemble(nn.Module): method _get_dummy_classifier (line 19) | def _get_dummy_classifier(self): method __init__ (line 24) | def __init__(self, models, num_classes, use_softmax=False): method _forward (line 37) | def _forward(self, x): method forward (line 40) | def forward(self, x): method get_output_loader (line 44) | def get_output_loader(self, dl, device=gu.get_device(None), bs=None): method fit_classifier (line 56) | def fit_classifier(self, tr_dl, te_dl, lr=0.05, adam=False, wd=5e-5, d... class EnsembleLinear (line 74) | class EnsembleLinear(Ensemble): method _get_classifier (line 76) | def _get_classifier(self): method __init__ (line 85) | def __init__(self, models, num_classes=2, use_softmax=False, use_bias=... method _forward (line 90) | def _forward(self, x): class EnsembleMLP (line 97) | class EnsembleMLP(Ensemble): method _get_classifier (line 99) | def _get_classifier(self): method __init__ (line 104) | def __init__(self, models, num_classes=2, use_softmax=False, hdim=None... method _forward (line 110) | def _forward(self, x): class EnsembleAverage (line 117) | class EnsembleAverage(Ensemble): method __init__ (line 119) | def __init__(self, models, num_classes=2, use_softmax=False): method _forward (line 123) | def _forward(self, x): method fit_classifier (line 129) | def fit_classifier(self, *args, **kwargs): FILE: utils/scripts/gendata.py function _prep_data (line 10) | def _prep_data(X, Y, N_tr, N_te, bs, nw, pm, w, orth_matrix=None): function _get_random_data (line 29) | def _get_random_data(N, dim, scale): function generate_linsep_data_v2 (line 35) | def generate_linsep_data_v2(N_tr, dim, eff_margin, width=10., bs=256, sc... function sample_from_unif_union_of_unifs (line 54) | def sample_from_unif_union_of_unifs(unifs, size): function generate_ub_linslab_data_diffmargin_v2 (line 63) | def generate_ub_linslab_data_diffmargin_v2(N_tr, dim, eff_lin_margins, e... function generate_ub_linslab_data_v2 (line 270) | def generate_ub_linslab_data_v2(N_tr, dim, eff_lin_margin, eff_slab_marg... function get_lms_data (line 288) | def get_lms_data(**kw): FILE: utils/scripts/gpu_utils.py function get_gpu_info (line 7) | def get_gpu_info(print_info=True, get_specs=False): function get_device (line 27) | def get_device(device_id=None): # None -> cpu function get_gpu_name (line 32) | def get_gpu_name(): function get_cuda_version (line 41) | def get_cuda_version(): function get_cudnn_version (line 59) | def get_cudnn_version(): FILE: utils/scripts/lms_utils.py function parse_data (line 19) | def parse_data(exps=None, root='/', **funcs_kw): function parse_exp_stats (line 58) | def parse_exp_stats(data): function parse_exp_model (line 83) | def parse_exp_model(data): function parse_exp_depth1_model (line 92) | def parse_exp_depth1_model(data): function parse_exp_linear_model (line 107) | def parse_exp_linear_model(data): function parse_exp_data (line 116) | def parse_exp_data(data, load_X=False): function get_yhat (line 134) | def get_yhat(model, data): function get_acc (line 138) | def get_acc(y,yhat): function parse_and_get_df (line 142) | def parse_and_get_df(root, prefix, files=None, device_id=None, only_load... function viz (line 172) | def viz(d, c1, c2, k=80_000, info=True, plot_dm=True, plot_data=True, us... function visualize_boundary (line 209) | def visualize_boundary(model, data, c1, c2, dim, ax=None, is_binary=Fals... function get_randomized_loader (line 213) | def get_randomized_loader(dl, W, coordinates): function get_feature_deps (line 238) | def get_feature_deps(dl, model, W=None, dep_type='random', only_linear=F... function get_subset_feature_deps (line 305) | def get_subset_feature_deps(dl, model, coords_set, comb_size, W=None, de... FILE: utils/scripts/mnistcifar_utils.py function get_binary_mnist (line 12) | def get_binary_mnist(y1=0, y2=1, apply_padding=True, repeat_channels=True): function get_binary_cifar (line 27) | def get_binary_cifar(y1=3, y2=5, c={0,1,2,3,4}, use_cifar10=True): function combine_datasets (line 37) | def combine_datasets(Xm, Ym, Xc, Yc, randomize_order=False, randomize_fi... function get_mnist_cifar (line 79) | def get_mnist_cifar(mnist_classes=(0,1), cifar_classes=None, c={0,1,2,3,4}, function get_mnist_cifar_dl (line 92) | def get_mnist_cifar_dl(mnist_classes=(0,1), cifar_classes=None, c={0,1,2... FILE: utils/scripts/ptb_utils.py function get_yhat (line 23) | def get_yhat(model, data): return torch.argmax(model(data), 1) function get_acc (line 24) | def get_acc(y,yhat): return (y==yhat).sum().item()/float(len(y)) class PGD_Attack (line 26) | class PGD_Attack(object): method __init__ (line 28) | def __init__(self, eps, lr, num_iter, loss_type, rand_eps=1e-3, method evaluate_attack (line 45) | def evaluate_attack(self, dl, model): method perturb (line 79) | def perturb(self, xb, yb, model, cpu=False): method _perturb_once (line 105) | def _perturb_once(self, xb, yb, model, track_scores=False, stop_const=... method _init_delta (line 143) | def _init_delta(self, xb, yb): method _clamp_input (line 150) | def _clamp_input(self, xb, yb): method _get_loss (line 157) | def _get_loss(self, xb, yb, model, get_scores=False): class L2_PGD_Attack (line 189) | class L2_PGD_Attack(PGD_Attack): method get_norms (line 193) | def get_norms(self, X): method _update_delta (line 197) | def _update_delta(self, xb, yb, update_mask=None): method _init_delta (line 218) | def _init_delta(self, xb, yb): class Linf_PGD_Attack (line 228) | class Linf_PGD_Attack(PGD_Attack): method _update_delta (line 230) | def _update_delta(self, xb, yb, **kw): FILE: utils/scripts/synth_models.py function kaiming_init (line 12) | def kaiming_init(m): class SequenceClassifier (line 17) | class SequenceClassifier(nn.Module): method __init__ (line 19) | def __init__(self, seq_model, idim, hdim, hl, input_size, num_classes=... method forward (line 35) | def forward(self, x): class GRUClassifier (line 46) | class GRUClassifier(SequenceClassifier): method __init__ (line 48) | def __init__(self, idim, hdim, hl, input_size, num_classes=2, many_to_... class LSTMClassifier (line 51) | class LSTMClassifier(SequenceClassifier): method __init__ (line 53) | def __init__(self, idim, hdim, hl, input_size, num_classes=2, many_to_... class CNNClassifier (line 56) | class CNNClassifier(nn.Module): method __init__ (line 58) | def __init__(self, out_channels, hl, kernel_size, idim, num_classes=2,... method forward (line 92) | def forward(self, x): class CNN2DClassifier (line 104) | class CNN2DClassifier(nn.Module): method __init__ (line 106) | def __init__(self, num_filters, filter_size, num_layers, input_shape, ... method forward (line 134) | def forward(self, x): function get_linear (line 139) | def get_linear(input_dim, num_classes): function get_fcn (line 142) | def get_fcn(idim, hdim, odim, hl=1, init=False, activation=nn.ReLU, use_... FILE: utils/scripts/utils.py function get_orthonormal_matrix (line 24) | def get_orthonormal_matrix(n): function get_dataloader (line 32) | def get_dataloader(X, Y, bs, **kw): function split_dataloader (line 35) | def split_dataloader(dl, frac=0.5): function _to_dl (line 47) | def _to_dl(X, Y, bs, shuffle=True): function extract_tensors_from_loader (line 50) | def extract_tensors_from_loader(dl, repeat=1, transform_fn=None): function extract_numpy_from_loader (line 62) | def extract_numpy_from_loader(dl, repeat=1, transform_fn=None): function _to_tensor_dl (line 66) | def _to_tensor_dl(dl, repeat=1, bs=None): function flatten_loader (line 71) | def flatten_loader(dl, bs=None): function merge_loaders (line 76) | def merge_loaders(dla, dlb): function transform_loader (line 82) | def transform_loader(dl, func, shuffle=True): function visualize_tensors (line 87) | def visualize_tensors(P, size=8, normalize=True, scale_each=False, permu... function visualize_loader (line 101) | def visualize_loader(dl, ax=None, size=8, normalize=True, scale_each=Fal... function visualize_loader_by_class (line 107) | def visualize_loader_by_class(dl, ax=None, size=8, normalize=True, scale... function visualize_perturbations (line 121) | def visualize_perturbations(P, transform_fn=None): function get_logits_given_tensor (line 132) | def get_logits_given_tensor(X, model, device=None, bs=250, softmax=False): function get_predictions_given_tensor (line 150) | def get_predictions_given_tensor(X, model, device=None, bs=250): function get_accuracy_given_tensor (line 154) | def get_accuracy_given_tensor(X, Y, model, device=None, bs=250): function compute_accuracy (line 160) | def compute_accuracy(X, Y, model): function compute_loss_and_accuracy_from_dl (line 167) | def compute_loss_and_accuracy_from_dl(dl, model, loss_fn, sample_pct=1.0... function count_parameters (line 214) | def count_parameters(model): function get_logits (line 217) | def get_logits(model, loader, device): function get_scores (line 229) | def get_scores(model, loader, device): function get_multiclass_logit_score (line 235) | def get_multiclass_logit_score(L, Y): function get_binary_auc (line 249) | def get_binary_auc(model, loader, device): function get_multiclass_auc (line 253) | def get_multiclass_auc(model, loader, device, one_vs_rest=True): function clip_gradient (line 260) | def clip_gradient(model, clip_value): function print_model_gradients (line 264) | def print_model_gradients(model, print_bias=True): function hinge_loss (line 271) | def hinge_loss(out, y): function pgd_adv_fit_model (line 275) | def pgd_adv_fit_model(model, opt, tr_dl, te_dl, attack, eval_attack=None... function fit_model (line 421) | def fit_model(model, loss, opt, train_dl, valid_dl, sch=None, epsilon=1e... function save_pickle (line 696) | def save_pickle(fname, d, mode='w'): function load_pickle (line 700) | def load_pickle(fname, mode='r'): function update_ax (line 704) | def update_ax(ax, title=None, xlabel=None, ylabel=None, legend_loc='best... FILE: utils/slab_data.py function get_data (line 28) | def get_data(num_samples, spur_corr, slab_noise, total_slabs, data_case,...