SYMBOL INDEX (911 symbols across 122 files) FILE: Dassl.ProGrad.pytorch/dassl/config/__init__.py function get_cfg_default (line 4) | def get_cfg_default(): FILE: Dassl.ProGrad.pytorch/dassl/data/data_manager.py function build_data_loader (line 19) | def build_data_loader( class DataManager (line 57) | class DataManager: method __init__ (line 59) | def __init__( method num_classes (line 160) | def num_classes(self): method num_source_domains (line 164) | def num_source_domains(self): method lab2cname (line 168) | def lab2cname(self): method show_dataset_summary (line 171) | def show_dataset_summary(self, cfg): class DatasetWrapper (line 194) | class DatasetWrapper(TorchDataset): method __init__ (line 196) | def __init__(self, cfg, data_source, transform=None, is_train=False): method __len__ (line 223) | def __len__(self): method __getitem__ (line 226) | def __getitem__(self, idx): method _transform_image (line 254) | def _transform_image(self, tfm, img0): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/base_dataset.py class Datum (line 12) | class Datum: method __init__ (line 22) | def __init__(self, impath="", label=0, domain=0, classname=""): method impath (line 32) | def impath(self): method label (line 36) | def label(self): method domain (line 40) | def domain(self): method classname (line 44) | def classname(self): class DatasetBase (line 48) | class DatasetBase: method __init__ (line 58) | def __init__(self, train_x=None, train_u=None, val=None, test=None): method train_x (line 68) | def train_x(self): method train_u (line 72) | def train_u(self): method val (line 76) | def val(self): method test (line 80) | def test(self): method lab2cname (line 84) | def lab2cname(self): method classnames (line 88) | def classnames(self): method num_classes (line 92) | def num_classes(self): method get_num_classes (line 95) | def get_num_classes(self, data_source): method get_lab2cname (line 106) | def get_lab2cname(self, data_source): method check_input_domains (line 121) | def check_input_domains(self, source_domains, target_domains): method is_input_domain_valid (line 125) | def is_input_domain_valid(self, input_domains): method download_data (line 133) | def download_data(self, url, dst, from_gdrive=True): method generate_fewshot_dataset (line 155) | def generate_fewshot_dataset( method split_dataset_by_label (line 199) | def split_dataset_by_label(self, data_source): method split_dataset_by_domain (line 213) | def split_dataset_by_domain(self, data_source): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/build.py function build_dataset (line 6) | def build_dataset(cfg): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/da/cifarstl.py class CIFARSTL (line 10) | class CIFARSTL(DatasetBase): method __init__ (line 37) | def __init__(self, cfg): method _read_data (line 51) | def _read_data(self, input_domains, split="train"): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/da/digit5.py function read_image_list (line 17) | def read_image_list(im_dir, n_max=None, n_repeat=None): function load_mnist (line 35) | def load_mnist(dataset_dir, split="train"): function load_mnist_m (line 41) | def load_mnist_m(dataset_dir, split="train"): function load_svhn (line 47) | def load_svhn(dataset_dir, split="train"): function load_syn (line 53) | def load_syn(dataset_dir, split="train"): function load_usps (line 59) | def load_usps(dataset_dir, split="train"): class Digit5 (line 66) | class Digit5(DatasetBase): method __init__ (line 93) | def __init__(self, cfg): method _read_data (line 107) | def _read_data(self, input_domains, split="train"): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/da/domainnet.py class DomainNet (line 8) | class DomainNet(DatasetBase): method __init__ (line 30) | def __init__(self, cfg): method _read_data (line 46) | def _read_data(self, input_domains, split="train"): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/da/mini_domainnet.py class miniDomainNet (line 8) | class miniDomainNet(DatasetBase): method __init__ (line 20) | def __init__(self, cfg): method _read_data (line 35) | def _read_data(self, input_domains, split="train"): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/da/office31.py class Office31 (line 10) | class Office31(DatasetBase): method __init__ (line 27) | def __init__(self, cfg): method _read_data (line 41) | def _read_data(self, input_domains): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/da/office_home.py class OfficeHome (line 10) | class OfficeHome(DatasetBase): method __init__ (line 27) | def __init__(self, cfg): method _read_data (line 41) | def _read_data(self, input_domains): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/da/visda17.py class VisDA17 (line 8) | class VisDA17(DatasetBase): method __init__ (line 23) | def __init__(self, cfg): method _read_data (line 37) | def _read_data(self, dname): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/dg/cifar_c.py class CIFAR10C (line 32) | class CIFAR10C(DatasetBase): method __init__ (line 49) | def __init__(self, cfg): method _read_data (line 87) | def _read_data(self, data_dir): class CIFAR100C (line 105) | class CIFAR100C(CIFAR10C): method __init__ (line 122) | def __init__(self, cfg): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/dg/digit_single.py function read_image_list (line 16) | def read_image_list(im_dir, n_max=None, n_repeat=None): function load_mnist (line 36) | def load_mnist(dataset_dir, split="train"): function load_mnist_m (line 42) | def load_mnist_m(dataset_dir, split="train"): function load_svhn (line 48) | def load_svhn(dataset_dir, split="train"): function load_syn (line 54) | def load_syn(dataset_dir, split="train"): function load_usps (line 60) | def load_usps(dataset_dir, split="train"): class DigitSingle (line 66) | class DigitSingle(DatasetBase): method __init__ (line 98) | def __init__(self, cfg): method _read_data (line 112) | def _read_data(self, input_domains, split="train"): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/dg/digits_dg.py class DigitsDG (line 11) | class DigitsDG(DatasetBase): method __init__ (line 35) | def __init__(self, cfg): method read_data (line 60) | def read_data(dataset_dir, input_domains, split): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/dg/office_home_dg.py class OfficeHomeDG (line 9) | class OfficeHomeDG(DatasetBase): method __init__ (line 27) | def __init__(self, cfg): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/dg/pacs.py class PACS (line 8) | class PACS(DatasetBase): method __init__ (line 28) | def __init__(self, cfg): method _read_data (line 48) | def _read_data(self, input_domains, split): method _read_split_pacs (line 79) | def _read_split_pacs(self, split_file): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/dg/vlcs.py class VLCS (line 11) | class VLCS(DatasetBase): method __init__ (line 26) | def __init__(self, cfg): method _read_data (line 44) | def _read_data(self, input_domains, split): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/ssl/cifar.py class CIFAR10 (line 12) | class CIFAR10(DatasetBase): method __init__ (line 22) | def __init__(self, cfg): method _read_data_train (line 43) | def _read_data_train(self, data_dir, num_labeled, val_percent): method _read_data_test (line 79) | def _read_data_test(self, data_dir): class CIFAR100 (line 97) | class CIFAR100(CIFAR10): method __init__ (line 107) | def __init__(self, cfg): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/ssl/stl10.py class STL10 (line 11) | class STL10(DatasetBase): method __init__ (line 28) | def __init__(self, cfg): method _read_data_train (line 52) | def _read_data_train(self, data_dir, fold, fold_file): method _read_data_all (line 73) | def _read_data_all(self, data_dir): FILE: Dassl.ProGrad.pytorch/dassl/data/datasets/ssl/svhn.py class SVHN (line 6) | class SVHN(CIFAR10): method __init__ (line 16) | def __init__(self, cfg): FILE: Dassl.ProGrad.pytorch/dassl/data/samplers.py class RandomDomainSampler (line 8) | class RandomDomainSampler(Sampler): method __init__ (line 18) | def __init__(self, data_source, batch_size, n_domain): method __iter__ (line 38) | def __iter__(self): method __len__ (line 60) | def __len__(self): class SeqDomainSampler (line 64) | class SeqDomainSampler(Sampler): method __init__ (line 73) | def __init__(self, data_source, batch_size): method __iter__ (line 93) | def __iter__(self): method __len__ (line 113) | def __len__(self): class RandomClassSampler (line 117) | class RandomClassSampler(Sampler): method __init__ (line 129) | def __init__(self, data_source, batch_size, n_ins): method __iter__ (line 149) | def __iter__(self): method __len__ (line 177) | def __len__(self): function build_sampler (line 181) | def build_sampler( FILE: Dassl.ProGrad.pytorch/dassl/data/transforms/autoaugment.py class ImageNetPolicy (line 9) | class ImageNetPolicy: method __init__ (line 23) | def __init__(self, fillcolor=(128, 128, 128)): method __call__ (line 52) | def __call__(self, img): method __repr__ (line 56) | def __repr__(self): class CIFAR10Policy (line 60) | class CIFAR10Policy: method __init__ (line 74) | def __init__(self, fillcolor=(128, 128, 128)): method __call__ (line 103) | def __call__(self, img): method __repr__ (line 107) | def __repr__(self): class SVHNPolicy (line 111) | class SVHNPolicy: method __init__ (line 125) | def __init__(self, fillcolor=(128, 128, 128)): method __call__ (line 154) | def __call__(self, img): method __repr__ (line 158) | def __repr__(self): class SubPolicy (line 162) | class SubPolicy(object): method __init__ (line 164) | def __init__( method __call__ (line 268) | def __call__(self, img): FILE: Dassl.ProGrad.pytorch/dassl/data/transforms/randaugment.py function ShearX (line 16) | def ShearX(img, v): function ShearY (line 23) | def ShearY(img, v): function TranslateX (line 30) | def TranslateX(img, v): function TranslateXabs (line 39) | def TranslateXabs(img, v): function TranslateY (line 47) | def TranslateY(img, v): function TranslateYabs (line 56) | def TranslateYabs(img, v): function Rotate (line 64) | def Rotate(img, v): function AutoContrast (line 71) | def AutoContrast(img, _): function Invert (line 75) | def Invert(img, _): function Equalize (line 79) | def Equalize(img, _): function Flip (line 83) | def Flip(img, _): function Solarize (line 87) | def Solarize(img, v): function SolarizeAdd (line 92) | def SolarizeAdd(img, addition=0, threshold=128): function Posterize (line 101) | def Posterize(img, v): function Contrast (line 107) | def Contrast(img, v): function Color (line 112) | def Color(img, v): function Brightness (line 117) | def Brightness(img, v): function Sharpness (line 122) | def Sharpness(img, v): function Cutout (line 127) | def Cutout(img, v): function CutoutAbs (line 137) | def CutoutAbs(img, v): function SamplePairing (line 159) | def SamplePairing(imgs): function Identity (line 169) | def Identity(img, v): class Lighting (line 173) | class Lighting: method __init__ (line 176) | def __init__(self, alphastd, eigval, eigvec): method __call__ (line 181) | def __call__(self, img): class CutoutDefault (line 195) | class CutoutDefault: method __init__ (line 200) | def __init__(self, length): method __call__ (line 203) | def __call__(self, img): function randaugment_list (line 221) | def randaugment_list(): function randaugment_list2 (line 267) | def randaugment_list2(): function fixmatch_list (line 289) | def fixmatch_list(): class RandAugment (line 311) | class RandAugment: method __init__ (line 313) | def __init__(self, n=2, m=10): method __call__ (line 319) | def __call__(self, img): class RandAugment2 (line 329) | class RandAugment2: method __init__ (line 331) | def __init__(self, n=2, p=0.6): method __call__ (line 336) | def __call__(self, img): class RandAugmentFixMatch (line 349) | class RandAugmentFixMatch: method __init__ (line 351) | def __init__(self, n=2): method __call__ (line 355) | def __call__(self, img): FILE: Dassl.ProGrad.pytorch/dassl/data/transforms/transforms.py class Random2DTranslation (line 42) | class Random2DTranslation: method __init__ (line 55) | def __init__(self, height, width, p=0.5, interpolation=Image.BILINEAR): method __call__ (line 61) | def __call__(self, img): class InstanceNormalization (line 80) | class InstanceNormalization: method __init__ (line 90) | def __init__(self, eps=1e-8): method __call__ (line 93) | def __call__(self, img): class Cutout (line 101) | class Cutout: method __init__ (line 113) | def __init__(self, n_holes=1, length=16): method __call__ (line 117) | def __call__(self, img): class GaussianNoise (line 147) | class GaussianNoise: method __init__ (line 150) | def __init__(self, mean=0, std=0.15, p=0.5): method __call__ (line 155) | def __call__(self, img): function build_transform (line 162) | def build_transform(cfg, is_train=True, choices=None): function _build_transform_train (line 192) | def _build_transform_train(cfg, choices, target_size, normalize): function _build_transform_test (line 313) | def _build_transform_test(cfg, choices, target_size, normalize): FILE: Dassl.ProGrad.pytorch/dassl/engine/build.py function build_trainer (line 6) | def build_trainer(cfg): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/adabn.py class AdaBN (line 8) | class AdaBN(TrainerXU): method __init__ (line 14) | def __init__(self, cfg): method check_cfg (line 18) | def check_cfg(self, cfg): method before_epoch (line 23) | def before_epoch(self): method forward_backward (line 32) | def forward_backward(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/adda.py class ADDA (line 12) | class ADDA(TrainerXU): method __init__ (line 18) | def __init__(self, cfg): method check_cfg (line 33) | def check_cfg(self, cfg): method build_critic (line 38) | def build_critic(self): method forward_backward (line 57) | def forward_backward(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/dael.py class Experts (line 14) | class Experts(nn.Module): method __init__ (line 16) | def __init__(self, n_source, fdim, num_classes): method forward (line 23) | def forward(self, i, x): class DAEL (line 30) | class DAEL(TrainerXU): method __init__ (line 36) | def __init__(self, cfg): method check_cfg (line 48) | def check_cfg(self, cfg): method build_data_loader (line 53) | def build_data_loader(self): method build_model (line 69) | def build_model(self): method forward_backward (line 89) | def forward_backward(self, batch_x, batch_u): method parse_batch_train (line 183) | def parse_batch_train(self, batch_x, batch_u): method model_inference (line 201) | def model_inference(self, input): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/dann.py class DANN (line 14) | class DANN(TrainerXU): method __init__ (line 20) | def __init__(self, cfg): method build_critic (line 26) | def build_critic(self): method forward_backward (line 46) | def forward_backward(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/m3sda.py class PairClassifiers (line 11) | class PairClassifiers(nn.Module): method __init__ (line 13) | def __init__(self, fdim, num_classes): method forward (line 18) | def forward(self, x): class M3SDA (line 27) | class M3SDA(TrainerXU): method __init__ (line 33) | def __init__(self, cfg): method check_cfg (line 45) | def check_cfg(self, cfg): method build_model (line 49) | def build_model(self): method forward_backward (line 74) | def forward_backward(self, batch_x, batch_u): method moment_distance (line 153) | def moment_distance(self, x, u): method pairwise_distance (line 166) | def pairwise_distance(self, x, u): method euclidean (line 183) | def euclidean(self, input1, input2): method discrepancy (line 186) | def discrepancy(self, y1, y2): method parse_batch_train (line 189) | def parse_batch_train(self, batch_x, batch_u): method model_inference (line 201) | def model_inference(self, input): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/mcd.py class MCD (line 12) | class MCD(TrainerXU): method __init__ (line 18) | def __init__(self, cfg): method build_model (line 22) | def build_model(self): method forward_backward (line 50) | def forward_backward(self, batch_x, batch_u): method discrepancy (line 100) | def discrepancy(self, y1, y2): method model_inference (line 103) | def model_inference(self, input): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/mme.py class Prototypes (line 13) | class Prototypes(nn.Module): method __init__ (line 15) | def __init__(self, fdim, num_classes, temp=0.05): method forward (line 20) | def forward(self, x): class MME (line 28) | class MME(TrainerXU): method __init__ (line 34) | def __init__(self, cfg): method build_model (line 38) | def build_model(self): method forward_backward (line 59) | def forward_backward(self, batch_x, batch_u): method model_inference (line 85) | def model_inference(self, input): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/self_ensembling.py class SelfEnsembling (line 10) | class SelfEnsembling(TrainerXU): method __init__ (line 16) | def __init__(self, cfg): method check_cfg (line 27) | def check_cfg(self, cfg): method forward_backward (line 30) | def forward_backward(self, batch_x, batch_u): method parse_batch_train (line 67) | def parse_batch_train(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/da/source_only.py class SourceOnly (line 8) | class SourceOnly(TrainerXU): method forward_backward (line 13) | def forward_backward(self, batch_x, batch_u): method parse_batch_train (line 29) | def parse_batch_train(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/dg/crossgrad.py class CrossGrad (line 11) | class CrossGrad(TrainerX): method __init__ (line 17) | def __init__(self, cfg): method build_model (line 24) | def build_model(self): method forward_backward (line 43) | def forward_backward(self, batch): method model_inference (line 82) | def model_inference(self, input): FILE: Dassl.ProGrad.pytorch/dassl/engine/dg/daeldg.py class Experts (line 14) | class Experts(nn.Module): method __init__ (line 16) | def __init__(self, n_source, fdim, num_classes): method forward (line 23) | def forward(self, i, x): class DAELDG (line 30) | class DAELDG(TrainerX): method __init__ (line 38) | def __init__(self, cfg): method check_cfg (line 49) | def check_cfg(self, cfg): method build_data_loader (line 53) | def build_data_loader(self): method build_model (line 69) | def build_model(self): method forward_backward (line 89) | def forward_backward(self, batch): method parse_batch_train (line 146) | def parse_batch_train(self, batch): method model_inference (line 160) | def model_inference(self, input): FILE: Dassl.ProGrad.pytorch/dassl/engine/dg/ddaig.py class DDAIG (line 12) | class DDAIG(TrainerX): method __init__ (line 18) | def __init__(self, cfg): method build_model (line 27) | def build_model(self): method forward_backward (line 54) | def forward_backward(self, batch): method model_inference (line 106) | def model_inference(self, input): FILE: Dassl.ProGrad.pytorch/dassl/engine/dg/vanilla.py class Vanilla (line 8) | class Vanilla(TrainerX): method forward_backward (line 11) | def forward_backward(self, batch): method parse_batch_train (line 27) | def parse_batch_train(self, batch): FILE: Dassl.ProGrad.pytorch/dassl/engine/ssl/entmin.py class EntMin (line 9) | class EntMin(TrainerXU): method __init__ (line 15) | def __init__(self, cfg): method forward_backward (line 19) | def forward_backward(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/ssl/fixmatch.py class FixMatch (line 11) | class FixMatch(TrainerXU): method __init__ (line 18) | def __init__(self, cfg): method check_cfg (line 23) | def check_cfg(self, cfg): method build_data_loader (line 26) | def build_data_loader(self): method assess_y_pred_quality (line 40) | def assess_y_pred_quality(self, y_pred, y_true, mask): method forward_backward (line 52) | def forward_backward(self, batch_x, batch_u): method parse_batch_train (line 96) | def parse_batch_train(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/ssl/mean_teacher.py class MeanTeacher (line 10) | class MeanTeacher(TrainerXU): method __init__ (line 16) | def __init__(self, cfg): method forward_backward (line 27) | def forward_backward(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/ssl/mixmatch.py class MixMatch (line 12) | class MixMatch(TrainerXU): method __init__ (line 18) | def __init__(self, cfg): method check_cfg (line 25) | def check_cfg(self, cfg): method forward_backward (line 28) | def forward_backward(self, batch_x, batch_u): method parse_batch_train (line 88) | def parse_batch_train(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/ssl/sup_baseline.py class SupBaseline (line 8) | class SupBaseline(TrainerXU): method forward_backward (line 11) | def forward_backward(self, batch_x, batch_u): method parse_batch_train (line 27) | def parse_batch_train(self, batch_x, batch_u): FILE: Dassl.ProGrad.pytorch/dassl/engine/trainer.py class SimpleNet (line 23) | class SimpleNet(nn.Module): method __init__ (line 28) | def __init__(self, cfg, model_cfg, num_classes, **kwargs): method fdim (line 59) | def fdim(self): method forward (line 62) | def forward(self, x, return_feature=False): class TrainerBase (line 78) | class TrainerBase: method __init__ (line 81) | def __init__(self): method register_model (line 87) | def register_model(self, name="model", model=None, optim=None, sched=N... method get_model_names (line 109) | def get_model_names(self, names=None): method save_model (line 119) | def save_model(self, epoch, directory, is_best=False, model_name=""): method resume_model_if_exist (line 145) | def resume_model_if_exist(self, directory): method load_model (line 172) | def load_model(self, directory, epoch=None): method set_model_mode (line 206) | def set_model_mode(self, mode="train", names=None): method update_lr (line 217) | def update_lr(self, names=None): method detect_anomaly (line 224) | def detect_anomaly(self, loss): method init_writer (line 228) | def init_writer(self, log_dir): method close_writer (line 236) | def close_writer(self): method write_scalar (line 240) | def write_scalar(self, tag, scalar_value, global_step=None): method train (line 248) | def train(self, start_epoch, max_epoch): method before_train (line 260) | def before_train(self): method after_train (line 263) | def after_train(self): method before_epoch (line 266) | def before_epoch(self): method after_epoch (line 269) | def after_epoch(self): method run_epoch (line 272) | def run_epoch(self): method test (line 275) | def test(self): method parse_batch_train (line 278) | def parse_batch_train(self, batch): method parse_batch_test (line 281) | def parse_batch_test(self, batch): method forward_backward (line 284) | def forward_backward(self, batch): method model_inference (line 287) | def model_inference(self, input): method model_zero_grad (line 290) | def model_zero_grad(self, names=None): method model_backward (line 296) | def model_backward(self, loss): method model_update (line 300) | def model_update(self, names=None): method model_backward_and_update (line 306) | def model_backward_and_update(self, loss, names=None): method prograd_backward_and_update (line 311) | def prograd_backward_and_update( class SimpleTrainer (line 352) | class SimpleTrainer(TrainerBase): method __init__ (line 355) | def __init__(self, cfg): method check_cfg (line 375) | def check_cfg(self, cfg): method build_data_loader (line 387) | def build_data_loader(self): method build_model (line 405) | def build_model(self): method train (line 432) | def train(self): method before_train (line 435) | def before_train(self): method after_train (line 449) | def after_train(self): method after_epoch (line 467) | def after_epoch(self): method output_test (line 490) | def output_test(self, split=None): method test (line 529) | def test(self, split=None): method model_inference (line 557) | def model_inference(self, input): method parse_batch_test (line 560) | def parse_batch_test(self, batch): method get_current_lr (line 569) | def get_current_lr(self, names=None): class TrainerXU (line 575) | class TrainerXU(SimpleTrainer): method run_epoch (line 585) | def run_epoch(self): method parse_batch_train (line 661) | def parse_batch_train(self, batch_x, batch_u): class TrainerX (line 673) | class TrainerX(SimpleTrainer): method run_epoch (line 676) | def run_epoch(self): method parse_batch_train (line 726) | def parse_batch_train(self, batch): FILE: Dassl.ProGrad.pytorch/dassl/evaluation/build.py function build_evaluator (line 6) | def build_evaluator(cfg, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/evaluation/evaluator.py class EvaluatorBase (line 10) | class EvaluatorBase: method __init__ (line 13) | def __init__(self, cfg): method reset (line 16) | def reset(self): method process (line 19) | def process(self, mo, gt): method evaluate (line 22) | def evaluate(self): class Classification (line 27) | class Classification(EvaluatorBase): method __init__ (line 30) | def __init__(self, cfg, lab2cname=None, **kwargs): method reset (line 42) | def reset(self): method process (line 50) | def process(self, mo, gt): method evaluate (line 67) | def evaluate(self): FILE: Dassl.ProGrad.pytorch/dassl/metrics/accuracy.py function compute_accuracy (line 1) | def compute_accuracy(output, target, topk=(1, )): FILE: Dassl.ProGrad.pytorch/dassl/metrics/distance.py function compute_distance_matrix (line 8) | def compute_distance_matrix(input1, input2, metric="euclidean"): function euclidean_squared_distance (line 46) | def euclidean_squared_distance(input1, input2): function cosine_distance (line 64) | def cosine_distance(input1, input2): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/alexnet.py class AlexNet (line 13) | class AlexNet(Backbone): method __init__ (line 15) | def __init__(self): method forward (line 45) | def forward(self, x): function init_pretrained_weights (line 52) | def init_pretrained_weights(model, model_url): function alexnet (line 58) | def alexnet(pretrained=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/backbone.py class Backbone (line 4) | class Backbone(nn.Module): method __init__ (line 6) | def __init__(self): method forward (line 9) | def forward(self): method out_features (line 13) | def out_features(self): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/build.py function build_backbone (line 6) | def build_backbone(name, verbose=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/cnn_digit5_m3sda.py class FeatureExtractor (line 13) | class FeatureExtractor(Backbone): method __init__ (line 15) | def __init__(self): method _check_input (line 30) | def _check_input(self, x): method forward (line 36) | def forward(self, x): function cnn_digit5_m3sda (line 51) | def cnn_digit5_m3sda(**kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/cnn_digitsdg.py class Convolution (line 10) | class Convolution(nn.Module): method __init__ (line 12) | def __init__(self, c_in, c_out): method forward (line 17) | def forward(self, x): class ConvNet (line 21) | class ConvNet(Backbone): method __init__ (line 23) | def __init__(self, c_hidden=64): method _check_input (line 32) | def _check_input(self, x): method forward (line 38) | def forward(self, x): function cnn_digitsdg (line 52) | def cnn_digitsdg(**kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/cnn_digitsingle.py class CNN (line 14) | class CNN(Backbone): method __init__ (line 16) | def __init__(self): method _check_input (line 25) | def _check_input(self, x): method forward (line 31) | def forward(self, x): function cnn_digitsingle (line 53) | def cnn_digitsingle(**kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/efficientnet/model.py class MBConvBlock (line 14) | class MBConvBlock(nn.Module): method __init__ (line 26) | def __init__(self, block_args, global_params, image_size=None): method forward (line 98) | def forward(self, inputs, drop_connect_rate=None): method set_swish (line 137) | def set_swish(self, memory_efficient=True): class EfficientNet (line 142) | class EfficientNet(Backbone): method __init__ (line 155) | def __init__(self, blocks_args=None, global_params=None): method set_swish (line 240) | def set_swish(self, memory_efficient=True): method extract_features (line 246) | def extract_features(self, inputs): method forward (line 264) | def forward(self, inputs): method from_name (line 281) | def from_name(cls, model_name, override_params=None): method from_pretrained (line 289) | def from_pretrained( method get_image_size (line 302) | def get_image_size(cls, model_name): method _check_model_name_is_valid (line 308) | def _check_model_name_is_valid(cls, model_name): method _change_in_channels (line 316) | def _change_in_channels(model, in_channels): function build_efficientnet (line 327) | def build_efficientnet(name, pretrained): function efficientnet_b0 (line 335) | def efficientnet_b0(pretrained=True, **kwargs): function efficientnet_b1 (line 340) | def efficientnet_b1(pretrained=True, **kwargs): function efficientnet_b2 (line 345) | def efficientnet_b2(pretrained=True, **kwargs): function efficientnet_b3 (line 350) | def efficientnet_b3(pretrained=True, **kwargs): function efficientnet_b4 (line 355) | def efficientnet_b4(pretrained=True, **kwargs): function efficientnet_b5 (line 360) | def efficientnet_b5(pretrained=True, **kwargs): function efficientnet_b6 (line 365) | def efficientnet_b6(pretrained=True, **kwargs): function efficientnet_b7 (line 370) | def efficientnet_b7(pretrained=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/efficientnet/utils.py class SwishImplementation (line 56) | class SwishImplementation(torch.autograd.Function): method forward (line 59) | def forward(ctx, i): method backward (line 65) | def backward(ctx, grad_output): class MemoryEfficientSwish (line 71) | class MemoryEfficientSwish(nn.Module): method forward (line 73) | def forward(self, x): class Swish (line 77) | class Swish(nn.Module): method forward (line 79) | def forward(self, x): function round_filters (line 83) | def round_filters(filters, global_params): function round_repeats (line 98) | def round_repeats(repeats, global_params): function drop_connect (line 106) | def drop_connect(inputs, p, training): function get_same_padding_conv2d (line 121) | def get_same_padding_conv2d(image_size=None): function get_width_and_height_from_size (line 130) | def get_width_and_height_from_size(x): function calculate_output_image_size (line 140) | def calculate_output_image_size(input_image_size, stride): class Conv2dDynamicSamePadding (line 156) | class Conv2dDynamicSamePadding(nn.Conv2d): method __init__ (line 159) | def __init__( method forward (line 176) | def forward(self, x): class Conv2dStaticSamePadding (line 203) | class Conv2dStaticSamePadding(nn.Conv2d): method __init__ (line 206) | def __init__( method forward (line 238) | def forward(self, x): class Identity (line 252) | class Identity(nn.Module): method __init__ (line 254) | def __init__(self, ): method forward (line 257) | def forward(self, input): function efficientnet_params (line 266) | def efficientnet_params(model_name): class BlockDecoder (line 284) | class BlockDecoder(object): method _decode_block_string (line 288) | def _decode_block_string(block_string): method _encode_block_string (line 317) | def _encode_block_string(block): method decode (line 334) | def decode(string_list): method encode (line 348) | def encode(blocks_args): function efficientnet (line 361) | def efficientnet( function get_model_params (line 399) | def get_model_params(model_name, override_params): function load_pretrained_weights (line 461) | def load_pretrained_weights(model, model_name, load_fc=True, advprop=Fal... FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/mobilenetv2.py function _make_divisible (line 13) | def _make_divisible(v, divisor, min_value=None): class ConvBNReLU (line 33) | class ConvBNReLU(nn.Sequential): method __init__ (line 35) | def __init__( class InvertedResidual (line 54) | class InvertedResidual(nn.Module): method __init__ (line 56) | def __init__(self, inp, oup, stride, expand_ratio): method forward (line 81) | def forward(self, x): class MobileNetV2 (line 88) | class MobileNetV2(Backbone): method __init__ (line 90) | def __init__( method _forward_impl (line 178) | def _forward_impl(self, x): method forward (line 185) | def forward(self, x): function init_pretrained_weights (line 189) | def init_pretrained_weights(model, model_url): function mobilenetv2 (line 213) | def mobilenetv2(pretrained=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/preact_resnet18.py class PreActBlock (line 8) | class PreActBlock(nn.Module): method __init__ (line 11) | def __init__(self, in_planes, planes, stride=1): method forward (line 38) | def forward(self, x): class PreActBottleneck (line 47) | class PreActBottleneck(nn.Module): method __init__ (line 50) | def __init__(self, in_planes, planes, stride=1): method forward (line 79) | def forward(self, x): class PreActResNet (line 89) | class PreActResNet(Backbone): method __init__ (line 91) | def __init__(self, block, num_blocks): method _make_layer (line 105) | def _make_layer(self, block, planes, num_blocks, stride): method forward (line 113) | def forward(self, x): function preact_resnet18 (line 134) | def preact_resnet18(**kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/resnet.py function conv3x3 (line 16) | def conv3x3(in_planes, out_planes, stride=1): class BasicBlock (line 28) | class BasicBlock(nn.Module): method __init__ (line 31) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 41) | def forward(self, x): class Bottleneck (line 60) | class Bottleneck(nn.Module): method __init__ (line 63) | def __init__(self, inplanes, planes, stride=1, downsample=None): method forward (line 84) | def forward(self, x): class ResNet (line 107) | class ResNet(Backbone): method __init__ (line 109) | def __init__( method _make_layer (line 147) | def _make_layer(self, block, planes, blocks, stride=1): method _init_params (line 169) | def _init_params(self): method featuremaps (line 188) | def featuremaps(self, x): method forward (line 204) | def forward(self, x): function init_pretrained_weights (line 210) | def init_pretrained_weights(model, model_url): function resnet18 (line 227) | def resnet18(pretrained=True, **kwargs): function resnet34 (line 237) | def resnet34(pretrained=True, **kwargs): function resnet50 (line 247) | def resnet50(pretrained=True, **kwargs): function resnet101 (line 257) | def resnet101(pretrained=True, **kwargs): function resnet152 (line 267) | def resnet152(pretrained=True, **kwargs): function resnet18_ms_l123 (line 282) | def resnet18_ms_l123(pretrained=True, **kwargs): function resnet18_ms_l12 (line 299) | def resnet18_ms_l12(pretrained=True, **kwargs): function resnet18_ms_l1 (line 316) | def resnet18_ms_l1(pretrained=True, **kwargs): function resnet50_ms_l123 (line 333) | def resnet50_ms_l123(pretrained=True, **kwargs): function resnet50_ms_l12 (line 350) | def resnet50_ms_l12(pretrained=True, **kwargs): function resnet50_ms_l1 (line 367) | def resnet50_ms_l1(pretrained=True, **kwargs): function resnet101_ms_l123 (line 384) | def resnet101_ms_l123(pretrained=True, **kwargs): function resnet101_ms_l12 (line 401) | def resnet101_ms_l12(pretrained=True, **kwargs): function resnet101_ms_l1 (line 418) | def resnet101_ms_l1(pretrained=True, **kwargs): function resnet18_efdmix_l123 (line 440) | def resnet18_efdmix_l123(pretrained=True, **kwargs): function resnet18_efdmix_l12 (line 457) | def resnet18_efdmix_l12(pretrained=True, **kwargs): function resnet18_efdmix_l1 (line 474) | def resnet18_efdmix_l1(pretrained=True, **kwargs): function resnet50_efdmix_l123 (line 491) | def resnet50_efdmix_l123(pretrained=True, **kwargs): function resnet50_efdmix_l12 (line 508) | def resnet50_efdmix_l12(pretrained=True, **kwargs): function resnet50_efdmix_l1 (line 525) | def resnet50_efdmix_l1(pretrained=True, **kwargs): function resnet101_efdmix_l123 (line 542) | def resnet101_efdmix_l123(pretrained=True, **kwargs): function resnet101_efdmix_l12 (line 559) | def resnet101_efdmix_l12(pretrained=True, **kwargs): function resnet101_efdmix_l1 (line 576) | def resnet101_efdmix_l1(pretrained=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/shufflenetv2.py function channel_shuffle (line 21) | def channel_shuffle(x, groups): class InvertedResidual (line 36) | class InvertedResidual(nn.Module): method __init__ (line 38) | def __init__(self, inp, oup, stride): method depthwise_conv (line 98) | def depthwise_conv(i, o, kernel_size, stride=1, padding=0, bias=False): method forward (line 103) | def forward(self, x): class ShuffleNetV2 (line 115) | class ShuffleNetV2(Backbone): method __init__ (line 117) | def __init__(self, stages_repeats, stages_out_channels, **kwargs): method featuremaps (line 162) | def featuremaps(self, x): method forward (line 171) | def forward(self, x): function init_pretrained_weights (line 177) | def init_pretrained_weights(model, model_url): function shufflenet_v2_x0_5 (line 201) | def shufflenet_v2_x0_5(pretrained=True, **kwargs): function shufflenet_v2_x1_0 (line 209) | def shufflenet_v2_x1_0(pretrained=True, **kwargs): function shufflenet_v2_x1_5 (line 217) | def shufflenet_v2_x1_5(pretrained=True, **kwargs): function shufflenet_v2_x2_0 (line 225) | def shufflenet_v2_x2_0(pretrained=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/vgg.py class VGG (line 24) | class VGG(Backbone): method __init__ (line 26) | def __init__(self, features, init_weights=True): method forward (line 45) | def forward(self, x): method _initialize_weights (line 51) | def _initialize_weights(self): function make_layers (line 67) | def make_layers(cfg, batch_norm=False): function _vgg (line 133) | def _vgg(arch, cfg, batch_norm, pretrained): function vgg16 (line 146) | def vgg16(pretrained=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/backbone/wide_resnet.py class BasicBlock (line 12) | class BasicBlock(nn.Module): method __init__ (line 14) | def __init__(self, in_planes, out_planes, stride, dropRate=0.0): method forward (line 49) | def forward(self, x): class NetworkBlock (line 61) | class NetworkBlock(nn.Module): method __init__ (line 63) | def __init__( method _make_layer (line 71) | def _make_layer( method forward (line 86) | def forward(self, x): class WideResNet (line 90) | class WideResNet(Backbone): method __init__ (line 92) | def __init__(self, depth, widen_factor, dropRate=0.0): method forward (line 133) | def forward(self, x): function wide_resnet_28_2 (line 144) | def wide_resnet_28_2(**kwargs): function wide_resnet_16_4 (line 149) | def wide_resnet_16_4(**kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/head/build.py function build_head (line 6) | def build_head(name, verbose=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/head/mlp.py class MLP (line 7) | class MLP(nn.Module): method __init__ (line 9) | def __init__( method forward (line 44) | def forward(self, x): function mlp (line 49) | def mlp(**kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/network/build.py function build_network (line 6) | def build_network(name, verbose=True, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/network/ddaig_fcn.py function init_network_weights (line 12) | def init_network_weights(model, init_type="normal", gain=0.02): function get_norm_layer (line 45) | def get_norm_layer(norm_type="instance"): class ResnetBlock (line 61) | class ResnetBlock(nn.Module): method __init__ (line 63) | def __init__(self, dim, padding_type, norm_layer, use_dropout, use_bias): method build_conv_block (line 69) | def build_conv_block( method forward (line 111) | def forward(self, x): class LocNet (line 115) | class LocNet(nn.Module): method __init__ (line 118) | def __init__( method forward (line 152) | def forward(self, x): class FCN (line 163) | class FCN(nn.Module): method __init__ (line 166) | def __init__( method init_loc_layer (line 236) | def init_loc_layer(self): method stn (line 244) | def stn(self, x): method forward (line 250) | def forward(self, x, lmda=1.0, return_p=False, return_stn_output=False): function fcn_3x32_gctx (line 283) | def fcn_3x32_gctx(**kwargs): function fcn_3x64_gctx (line 291) | def fcn_3x64_gctx(**kwargs): function fcn_3x32_gctx_stn (line 299) | def fcn_3x32_gctx_stn(image_size=32, **kwargs): function fcn_3x64_gctx_stn (line 316) | def fcn_3x64_gctx_stn(image_size=224, **kwargs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/cross_entropy.py function cross_entropy (line 5) | def cross_entropy(input, target, label_smooth=0, reduction="mean"): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/dsbn.py class _DSBN (line 4) | class _DSBN(nn.Module): method __init__ (line 13) | def __init__(self, num_features, n_domain, bn_type): method select_bn (line 28) | def select_bn(self, domain_idx=0): method forward (line 32) | def forward(self, x): class DSBN1d (line 36) | class DSBN1d(_DSBN): method __init__ (line 38) | def __init__(self, num_features, n_domain): class DSBN2d (line 42) | class DSBN2d(_DSBN): method __init__ (line 44) | def __init__(self, num_features, n_domain): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/efdmix.py function deactivate_efdmix (line 7) | def deactivate_efdmix(m): function activate_efdmix (line 12) | def activate_efdmix(m): function random_efdmix (line 17) | def random_efdmix(m): function crossdomain_efdmix (line 22) | def crossdomain_efdmix(m): function run_without_efdmix (line 28) | def run_without_efdmix(model): function run_with_efdmix (line 38) | def run_with_efdmix(model, mix=None): class EFDMix (line 53) | class EFDMix(nn.Module): method __init__ (line 60) | def __init__(self, p=0.5, alpha=0.1, eps=1e-6, mix="random"): method __repr__ (line 76) | def __repr__(self): method set_activation_status (line 81) | def set_activation_status(self, status=True): method update_mix_method (line 84) | def update_mix_method(self, mix="random"): method forward (line 87) | def forward(self, x): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/mixstyle.py function deactivate_mixstyle (line 7) | def deactivate_mixstyle(m): function activate_mixstyle (line 12) | def activate_mixstyle(m): function random_mixstyle (line 17) | def random_mixstyle(m): function crossdomain_mixstyle (line 22) | def crossdomain_mixstyle(m): function run_without_mixstyle (line 28) | def run_without_mixstyle(model): function run_with_mixstyle (line 38) | def run_with_mixstyle(model, mix=None): class MixStyle (line 53) | class MixStyle(nn.Module): method __init__ (line 60) | def __init__(self, p=0.5, alpha=0.1, eps=1e-6, mix="random"): method __repr__ (line 76) | def __repr__(self): method set_activation_status (line 81) | def set_activation_status(self, status=True): method update_mix_method (line 84) | def update_mix_method(self, mix="random"): method forward (line 87) | def forward(self, x): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/mixup.py function mixup (line 4) | def mixup(x1, x2, y1, y2, beta, preserve_order=False): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/mmd.py class MaximumMeanDiscrepancy (line 6) | class MaximumMeanDiscrepancy(nn.Module): method __init__ (line 8) | def __init__(self, kernel_type="rbf", normalize=False): method forward (line 13) | def forward(self, x, y): method linear_mmd (line 28) | def linear_mmd(self, x, y): method poly_mmd (line 35) | def poly_mmd(self, x, y, alpha=1.0, c=2.0, d=2): method rbf_mmd (line 45) | def rbf_mmd(self, x, y): method rbf_kernel_mixture (line 60) | def rbf_kernel_mixture(exponent, sigmas=[1, 5, 10]): method remove_self_distance (line 68) | def remove_self_distance(distmat): method euclidean_squared_distance (line 76) | def euclidean_squared_distance(x, y): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/optimal_transport.py class OptimalTransport (line 6) | class OptimalTransport(nn.Module): method distance (line 9) | def distance(batch1, batch2, dist_metric="cosine"): class SinkhornDivergence (line 35) | class SinkhornDivergence(OptimalTransport): method __init__ (line 38) | def __init__( method forward (line 51) | def forward(self, x, y): method transport_cost (line 58) | def transport_cost(self, x, y, return_pi=False): method sinkhorn_iterate (line 69) | def sinkhorn_iterate(C, eps, max_iter, thre): class MinibatchEnergyDistance (line 103) | class MinibatchEnergyDistance(SinkhornDivergence): method __init__ (line 105) | def __init__( method forward (line 119) | def forward(self, x, y): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/reverse_grad.py class _ReverseGrad (line 5) | class _ReverseGrad(Function): method forward (line 8) | def forward(ctx, input, grad_scaling): method backward (line 13) | def backward(ctx, grad_output): class ReverseGrad (line 21) | class ReverseGrad(nn.Module): method forward (line 29) | def forward(self, x, grad_scaling=1.0): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/sequential2.py class Sequential2 (line 4) | class Sequential2(nn.Sequential): method forward (line 9) | def forward(self, *inputs): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/transnorm.py class _TransNorm (line 5) | class _TransNorm(nn.Module): method __init__ (line 19) | def __init__( method resnet_running_stats (line 36) | def resnet_running_stats(self): method reset_parameters (line 42) | def reset_parameters(self): method _check_input (line 46) | def _check_input(self, x): method _compute_alpha (line 49) | def _compute_alpha(self, mean_s, var_s, mean_t, var_t): method forward (line 57) | def forward(self, input): class TransNorm1d (line 121) | class TransNorm1d(_TransNorm): method _check_input (line 123) | def _check_input(self, x): class TransNorm2d (line 131) | class TransNorm2d(_TransNorm): method _check_input (line 133) | def _check_input(self, x): FILE: Dassl.ProGrad.pytorch/dassl/modeling/ops/utils.py function sharpen_prob (line 5) | def sharpen_prob(p, temperature=2): function reverse_index (line 16) | def reverse_index(data, label): function shuffle_index (line 22) | def shuffle_index(data, label): function create_onehot (line 28) | def create_onehot(label, num_classes): function sigmoid_rampup (line 41) | def sigmoid_rampup(current, rampup_length): function linear_rampup (line 54) | def linear_rampup(current, rampup_length): function ema_model_update (line 66) | def ema_model_update(model, ema_model, alpha): FILE: Dassl.ProGrad.pytorch/dassl/optim/lr_scheduler.py class _BaseWarmupScheduler (line 10) | class _BaseWarmupScheduler(_LRScheduler): method __init__ (line 12) | def __init__( method get_lr (line 24) | def get_lr(self): method step (line 27) | def step(self, epoch=None): class ConstantWarmupScheduler (line 35) | class ConstantWarmupScheduler(_BaseWarmupScheduler): method __init__ (line 37) | def __init__( method get_lr (line 51) | def get_lr(self): class LinearWarmupScheduler (line 57) | class LinearWarmupScheduler(_BaseWarmupScheduler): method __init__ (line 59) | def __init__( method get_lr (line 73) | def get_lr(self): function build_lr_scheduler (line 83) | def build_lr_scheduler(optimizer, optim_cfg): FILE: Dassl.ProGrad.pytorch/dassl/optim/optimizer.py function build_optimizer (line 13) | def build_optimizer(model, optim_cfg): FILE: Dassl.ProGrad.pytorch/dassl/optim/radam.py class RAdam (line 18) | class RAdam(Optimizer): method __init__ (line 20) | def __init__( method __setstate__ (line 47) | def __setstate__(self, state): method step (line 50) | def step(self, closure=None): class PlainRAdam (line 133) | class PlainRAdam(Optimizer): method __init__ (line 135) | def __init__( method __setstate__ (line 162) | def __setstate__(self, state): method step (line 165) | def step(self, closure=None): class AdamW (line 234) | class AdamW(Optimizer): method __init__ (line 236) | def __init__( method __setstate__ (line 267) | def __setstate__(self, state): method step (line 270) | def step(self, closure=None): FILE: Dassl.ProGrad.pytorch/dassl/utils/logger.py class Logger (line 11) | class Logger: method __init__ (line 27) | def __init__(self, fpath=None): method __del__ (line 34) | def __del__(self): method __enter__ (line 37) | def __enter__(self): method __exit__ (line 40) | def __exit__(self, *args): method write (line 43) | def write(self, msg): method flush (line 48) | def flush(self): method close (line 54) | def close(self): function setup_logger (line 60) | def setup_logger(output=None): FILE: Dassl.ProGrad.pytorch/dassl/utils/meters.py class AverageMeter (line 7) | class AverageMeter: method __init__ (line 17) | def __init__(self, ema=False): method reset (line 25) | def reset(self): method update (line 31) | def update(self, val, n=1): class MetricMeter (line 45) | class MetricMeter: method __init__ (line 58) | def __init__(self, delimiter="\t"): method update (line 62) | def update(self, input_dict): method __str__ (line 76) | def __str__(self): FILE: Dassl.ProGrad.pytorch/dassl/utils/registry.py class Registry (line 7) | class Registry: method __init__ (line 32) | def __init__(self, name): method _do_register (line 36) | def _do_register(self, name, obj, force=False): method register (line 45) | def register(self, obj=None, force=False): method get (line 59) | def get(self, name): method registered_names (line 68) | def registered_names(self): FILE: Dassl.ProGrad.pytorch/dassl/utils/tools.py function mkdir_if_missing (line 34) | def mkdir_if_missing(dirname): function check_isfile (line 44) | def check_isfile(fpath): function read_json (line 59) | def read_json(fpath): function write_json (line 66) | def write_json(obj, fpath): function set_random_seed (line 73) | def set_random_seed(seed): function download_url (line 80) | def download_url(url, dst): function read_image (line 111) | def read_image(path): function collect_env_info (line 134) | def collect_env_info(): function listdir_nohidden (line 146) | def listdir_nohidden(path, sort=False): function get_most_similar_str_to_a_from_b (line 159) | def get_most_similar_str_to_a_from_b(a, b): function check_availability (line 176) | def check_availability(requested, available): function tolist_if_not (line 192) | def tolist_if_not(x): FILE: Dassl.ProGrad.pytorch/dassl/utils/torchtools.py function save_checkpoint (line 27) | def save_checkpoint( function load_checkpoint (line 85) | def load_checkpoint(fpath): function resume_from_checkpoint (line 126) | def resume_from_checkpoint(fdir, model, optimizer=None, scheduler=None): function adjust_learning_rate (line 168) | def adjust_learning_rate( function set_bn_to_eval (line 194) | def set_bn_to_eval(m): function open_all_layers (line 203) | def open_all_layers(model): function open_specified_layers (line 214) | def open_specified_layers(model, open_layers): function count_num_param (line 254) | def count_num_param(model): function load_pretrained_weights (line 266) | def load_pretrained_weights(model, weight_path): function init_network_weights (line 323) | def init_network_weights(model, init_type="normal", gain=0.02): FILE: Dassl.ProGrad.pytorch/datasets/da/cifar_stl.py function extract_and_save_image (line 47) | def extract_and_save_image(dataset, save_dir, discard, label2name): function download_and_prepare (line 70) | def download_and_prepare(name, root, discarded_label, label2name): FILE: Dassl.ProGrad.pytorch/datasets/da/digit5.py function mkdir_if_missing (line 9) | def mkdir_if_missing(directory): function extract_and_save (line 14) | def extract_and_save(data, label, save_dir): function load_mnist (line 28) | def load_mnist(data_dir, raw_data_dir): function load_mnist_m (line 41) | def load_mnist_m(data_dir, raw_data_dir): function load_svhn (line 54) | def load_svhn(data_dir, raw_data_dir): function load_syn (line 66) | def load_syn(data_dir, raw_data_dir): function load_usps (line 79) | def load_usps(data_dir, raw_data_dir): function main (line 98) | def main(data_dir): FILE: Dassl.ProGrad.pytorch/datasets/dg/cifar_c.py function extract_and_save (line 15) | def extract_and_save(images, labels, level, dst): function main (line 29) | def main(npy_folder): FILE: Dassl.ProGrad.pytorch/datasets/ssl/cifar10_cifar100_svhn.py function extract_and_save_image (line 8) | def extract_and_save_image(dataset, save_dir): function download_and_prepare (line 24) | def download_and_prepare(name, root): FILE: Dassl.ProGrad.pytorch/datasets/ssl/stl10.py function extract_and_save_image (line 8) | def extract_and_save_image(dataset, save_dir): function download_and_prepare (line 27) | def download_and_prepare(root): FILE: Dassl.ProGrad.pytorch/setup.py function readme (line 6) | def readme(): function find_version (line 12) | def find_version(): function numpy_include (line 19) | def numpy_include(): function get_requirements (line 27) | def get_requirements(filename='requirements.txt'): FILE: Dassl.ProGrad.pytorch/tools/parse_test_res.py function compute_ci95 (line 60) | def compute_ci95(res): function parse_function (line 64) | def parse_function(*metrics, directory="", args=None, end_signal=None): function main (line 126) | def main(args, end_signal): FILE: Dassl.ProGrad.pytorch/tools/replace_text.py function is_python_file (line 12) | def is_python_file(filename): function update_file (line 17) | def update_file(filename, text_to_search, replacement_text): function recursive_update (line 24) | def recursive_update(directory, text_to_search, replacement_text): function main (line 38) | def main(): FILE: Dassl.ProGrad.pytorch/tools/train.py function print_args (line 9) | def print_args(args, cfg): function reset_cfg (line 23) | def reset_cfg(cfg, args): function extend_cfg (line 55) | def extend_cfg(cfg): function setup_cfg (line 69) | def setup_cfg(args): function main (line 92) | def main(args): FILE: ProGrad.public/clip/clip.py function _download (line 43) | def _download(url: str, root: str = os.path.expanduser("~/.cache/clip")): function _transform (line 86) | def _transform(n_px): function available_models (line 97) | def available_models() -> List[str]: function load (line 102) | def load(name: str, function tokenize (line 216) | def tokenize(texts: Union[str, List[str]], FILE: ProGrad.public/clip/model.py class Bottleneck (line 10) | class Bottleneck(nn.Module): method __init__ (line 13) | def __init__(self, inplanes, planes, stride=1): method forward (line 44) | def forward(self, x: torch.Tensor): class AttentionPool2d (line 60) | class AttentionPool2d(nn.Module): method __init__ (line 61) | def __init__(self, method forward (line 75) | def forward(self, x): class ModifiedResNet (line 106) | class ModifiedResNet(nn.Module): method __init__ (line 113) | def __init__(self, method _make_layer (line 157) | def _make_layer(self, planes, blocks, stride=1): method forward (line 166) | def forward(self, x): class LayerNorm (line 185) | class LayerNorm(nn.LayerNorm): method forward (line 187) | def forward(self, x: torch.Tensor): class QuickGELU (line 193) | class QuickGELU(nn.Module): method forward (line 194) | def forward(self, x: torch.Tensor): class ResidualAttentionBlock (line 198) | class ResidualAttentionBlock(nn.Module): method __init__ (line 199) | def __init__(self, method attention (line 214) | def attention(self, x: torch.Tensor): method forward (line 221) | def forward(self, x: torch.Tensor): class Transformer (line 227) | class Transformer(nn.Module): method __init__ (line 228) | def __init__(self, method forward (line 241) | def forward(self, x: torch.Tensor): class VisionTransformer (line 245) | class VisionTransformer(nn.Module): method __init__ (line 246) | def __init__(self, input_resolution: int, patch_size: int, width: int, method forward (line 268) | def forward(self, x: torch.Tensor): class CLIP (line 293) | class CLIP(nn.Module): method __init__ (line 294) | def __init__( method initialize_parameters (line 345) | def initialize_parameters(self): method build_attention_mask (line 379) | def build_attention_mask(self): method dtype (line 388) | def dtype(self): method encode_image (line 391) | def encode_image(self, image): method encode_text (line 394) | def encode_text(self, text): method forward (line 411) | def forward(self, image, text): function convert_weights (line 430) | def convert_weights(model: nn.Module): function build_model (line 456) | def build_model(state_dict: dict): FILE: ProGrad.public/clip/simple_tokenizer.py function default_bpe (line 11) | def default_bpe(): function bytes_to_unicode (line 17) | def bytes_to_unicode(): function get_pairs (line 43) | def get_pairs(word): function basic_clean (line 55) | def basic_clean(text): function whitespace_clean (line 61) | def whitespace_clean(text): class SimpleTokenizer (line 67) | class SimpleTokenizer(object): method __init__ (line 68) | def __init__(self, bpe_path: str = default_bpe()): method bpe (line 90) | def bpe(self, token): method encode (line 133) | def encode(self, text): method decode (line 143) | def decode(self, tokens): FILE: ProGrad.public/datasets/caltech101.py class Caltech101 (line 20) | class Caltech101(DatasetBase): method __init__ (line 24) | def __init__(self, cfg): FILE: ProGrad.public/datasets/dtd.py class DescribableTextures (line 12) | class DescribableTextures(DatasetBase): method __init__ (line 16) | def __init__(self, cfg): method read_and_split_data (line 66) | def read_and_split_data(image_dir, FILE: ProGrad.public/datasets/eurosat.py class EuroSAT (line 25) | class EuroSAT(DatasetBase): method __init__ (line 29) | def __init__(self, cfg): method update_classname (line 79) | def update_classname(self, dataset_old): FILE: ProGrad.public/datasets/fgvc_aircraft.py class FGVCAircraft (line 11) | class FGVCAircraft(DatasetBase): method __init__ (line 15) | def __init__(self, cfg): method read_data (line 65) | def read_data(self, cname2lab, split_file): FILE: ProGrad.public/datasets/food101.py class Food101 (line 12) | class Food101(DatasetBase): method __init__ (line 16) | def __init__(self, cfg): FILE: ProGrad.public/datasets/imagenet.py class ImageNet (line 12) | class ImageNet(DatasetBase): method __init__ (line 16) | def __init__(self, cfg): method read_classnames (line 70) | def read_classnames(text_file): method read_data (line 84) | def read_data(self, classnames, split_dir): FILE: ProGrad.public/datasets/imagenet_a.py class ImageNetA (line 12) | class ImageNetA(DatasetBase): method __init__ (line 20) | def __init__(self, cfg): method read_data (line 32) | def read_data(self, classnames): FILE: ProGrad.public/datasets/imagenet_r.py class ImageNetR (line 12) | class ImageNetR(DatasetBase): method __init__ (line 20) | def __init__(self, cfg): method read_data (line 32) | def read_data(self, classnames): FILE: ProGrad.public/datasets/imagenet_sketch.py class ImageNetSketch (line 10) | class ImageNetSketch(DatasetBase): method __init__ (line 18) | def __init__(self, cfg): method read_data (line 30) | def read_data(self, classnames): FILE: ProGrad.public/datasets/imagenetv2.py class ImageNetV2 (line 10) | class ImageNetV2(DatasetBase): method __init__ (line 18) | def __init__(self, cfg): method read_data (line 31) | def read_data(self, classnames): FILE: ProGrad.public/datasets/oxford_flowers.py class OxfordFlowers (line 14) | class OxfordFlowers(DatasetBase): method __init__ (line 18) | def __init__(self, cfg): method read_data (line 70) | def read_data(self): FILE: ProGrad.public/datasets/oxford_pets.py class OxfordPets (line 12) | class OxfordPets(DatasetBase): method __init__ (line 16) | def __init__(self, cfg): method read_data (line 66) | def read_data(self, split_file): method split_trainval (line 87) | def split_trainval(trainval, p_val=0.2): method save_split (line 110) | def save_split(train, val, test, filepath, path_prefix): method read_split (line 133) | def read_split(filepath, path_prefix): method subsample_classes (line 153) | def subsample_classes(*args, subsample="all"): FILE: ProGrad.public/datasets/stanford_cars.py class StanfordCars (line 12) | class StanfordCars(DatasetBase): method __init__ (line 16) | def __init__(self, cfg): method read_data (line 72) | def read_data(self, image_dir, anno_file, meta_file): FILE: ProGrad.public/datasets/sun397.py class SUN397 (line 11) | class SUN397(DatasetBase): method __init__ (line 15) | def __init__(self, cfg): method read_data (line 74) | def read_data(self, cname2lab, text_file): FILE: ProGrad.public/datasets/ucf101.py class UCF101 (line 12) | class UCF101(DatasetBase): method __init__ (line 16) | def __init__(self, cfg): method read_data (line 78) | def read_data(self, cname2lab, text_file): FILE: ProGrad.public/interpret_prompt.py function load_clip_to_cpu (line 10) | def load_clip_to_cpu(backbone_name="RN50"): FILE: ProGrad.public/lpclip/feat_extractor.py function print_args (line 34) | def print_args(args, cfg): function reset_cfg (line 48) | def reset_cfg(cfg, args): function extend_cfg (line 65) | def extend_cfg(cfg): function setup_cfg (line 86) | def setup_cfg(args): function main (line 106) | def main(args): FILE: ProGrad.public/lpclip/linear_probe.py function binary_search (line 84) | def binary_search(c_left, c_right, seed, step, test_acc_step_list): FILE: ProGrad.public/lpclip/linear_probe_transfer.py function binary_search (line 103) | def binary_search(c_left, c_right, seed, step, test_acc_step_list): FILE: ProGrad.public/parse_test_res.py function compute_ci95 (line 60) | def compute_ci95(res): function parse_function (line 64) | def parse_function(*metrics, directory="", args=None, end_signal=None): function main (line 126) | def main(args, end_signal): FILE: ProGrad.public/train.py function print_args (line 34) | def print_args(args, cfg): function reset_cfg (line 48) | def reset_cfg(cfg, args): function extend_cfg (line 80) | def extend_cfg(cfg): function setup_cfg (line 118) | def setup_cfg(args): function main (line 141) | def main(args): FILE: ProGrad.public/trainers/cocoop.py function load_clip_to_cpu (line 21) | def load_clip_to_cpu(cfg): class TextEncoder (line 39) | class TextEncoder(nn.Module): method __init__ (line 40) | def __init__(self, clip_model): method forward (line 48) | def forward(self, prompts, tokenized_prompts): class PromptLearner (line 63) | class PromptLearner(nn.Module): method __init__ (line 64) | def __init__(self, cfg, classnames, clip_model): method construct_prompts (line 135) | def construct_prompts(self, ctx, prefix, suffix, label=None): method forward (line 156) | def forward(self, im_features): class CustomCLIP (line 199) | class CustomCLIP(nn.Module): method __init__ (line 200) | def __init__(self, cfg, classnames, clip_model): method forward (line 209) | def forward(self, image, label=None): class CoCoOp (line 235) | class CoCoOp(TrainerX): method check_cfg (line 236) | def check_cfg(self, cfg): method build_model (line 239) | def build_model(self): method forward_backward (line 290) | def forward_backward(self, batch): method parse_batch_train (line 318) | def parse_batch_train(self, batch): method load_model (line 325) | def load_model(self, directory, epoch=None): FILE: ProGrad.public/trainers/coop.py function load_clip_to_cpu (line 19) | def load_clip_to_cpu(cfg): class TextEncoder (line 37) | class TextEncoder(nn.Module): method __init__ (line 38) | def __init__(self, clip_model): method forward (line 46) | def forward(self, prompts, tokenized_prompts): class PromptLearner (line 61) | class PromptLearner(nn.Module): method __init__ (line 62) | def __init__(self, cfg, classnames, clip_model): method forward (line 138) | def forward(self): class CustomCLIP (line 227) | class CustomCLIP(nn.Module): method __init__ (line 228) | def __init__(self, cfg, classnames, clip_model): method forward (line 237) | def forward(self, image): class CoOp (line 256) | class CoOp(TrainerX): method check_cfg (line 262) | def check_cfg(self, cfg): method build_model (line 265) | def build_model(self): method forward_backward (line 306) | def forward_backward(self, batch): method parse_batch_train (line 333) | def parse_batch_train(self, batch): method load_model (line 340) | def load_model(self, directory, epoch=None): FILE: ProGrad.public/trainers/prograd.py function load_clip_to_cpu (line 24) | def load_clip_to_cpu(cfg): class TextEncoder (line 42) | class TextEncoder(nn.Module): method __init__ (line 43) | def __init__(self, clip_model): method forward (line 51) | def forward(self, prompts, tokenized_prompts): class PromptLearner (line 66) | class PromptLearner(nn.Module): method __init__ (line 67) | def __init__(self, cfg, classnames, clip_model): method forward (line 134) | def forward(self): class CLIP (line 220) | class CLIP(nn.Module): method __init__ (line 221) | def __init__(self, cfg, classnames): method forward (line 240) | def forward(self, image): class CustomCLIP (line 252) | class CustomCLIP(nn.Module): method __init__ (line 253) | def __init__(self, cfg, classnames, clip_model): method forward (line 262) | def forward(self, image): class ProGradLoss (line 280) | class ProGradLoss(_Loss): method __init__ (line 281) | def __init__(self, T): method forward (line 285) | def forward(self, stu_logits, tea_logits, label): class ProGrad (line 297) | class ProGrad(TrainerX): method check_cfg (line 300) | def check_cfg(self, cfg): method build_model (line 303) | def build_model(self): method forward_backward (line 360) | def forward_backward(self, batch): method parse_batch_train (line 396) | def parse_batch_train(self, batch): method load_model (line 403) | def load_model(self, directory, epoch=None): FILE: ProGrad.public/trainers/zsclip.py class ZeroshotCLIP (line 36) | class ZeroshotCLIP(TrainerX): method build_model (line 37) | def build_model(self): method model_inference (line 59) | def model_inference(self, image): class ZeroshotCLIP2 (line 69) | class ZeroshotCLIP2(ZeroshotCLIP): method build_model (line 75) | def build_model(self):