SYMBOL INDEX (1435 symbols across 252 files) FILE: examples/domain_adaptation/image_classification/adda.py function set_requires_grad (line 36) | def set_requires_grad(net, requires_grad=False): function main (line 44) | def main(args: argparse.Namespace): function train (line 186) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/afn.py function main (line 32) | def main(args: argparse.Namespace): function train (line 132) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/bsp.py function main (line 33) | def main(args: argparse.Namespace): function train (line 167) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/cc_loss.py function main (line 33) | def main(args: argparse.Namespace): function train (line 147) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/cdan.py function main (line 32) | def main(args: argparse.Namespace): function train (line 147) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/dan.py function main (line 32) | def main(args: argparse.Namespace): function train (line 138) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/dann.py function main (line 32) | def main(args: argparse.Namespace): function train (line 138) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/erm.py function main (line 27) | def main(args): FILE: examples/domain_adaptation/image_classification/fixmatch.py class ImageClassifier (line 33) | class ImageClassifier(Classifier): method __init__ (line 34) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... method forward (line 42) | def forward(self, x: torch.Tensor): function main (line 50) | def main(args: argparse.Namespace): function train (line 165) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/jan.py function main (line 32) | def main(args: argparse.Namespace): function train (line 149) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/mcc.py function main (line 31) | def main(args: argparse.Namespace): function train (line 136) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/mcd.py function main (line 32) | def main(args: argparse.Namespace): function train (line 147) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... function validate (line 240) | def validate(val_loader: DataLoader, G: nn.Module, F1: ImageClassifierHead, FILE: examples/domain_adaptation/image_classification/mdd.py function main (line 32) | def main(args: argparse.Namespace): function train (line 135) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/self_ensemble.py function main (line 35) | def main(args: argparse.Namespace): function train (line 176) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_classification/utils.py function get_model_names (line 26) | def get_model_names(): function get_model (line 34) | def get_model(model_name, pretrain=True): function get_dataset_names (line 50) | def get_dataset_names(): function get_dataset (line 57) | def get_dataset(dataset_name, root, source, target, train_source_transfo... function validate (line 96) | def validate(val_loader, model, args, device) -> float: function get_train_transform (line 144) | def get_train_transform(resizing='default', scale=(0.08, 1.0), ratio=(3.... function get_val_transform (line 196) | def get_val_transform(resizing='default', resize_size=224, function empirical_risk_minimization (line 219) | def empirical_risk_minimization(train_source_iter, model, optimizer, lr_... FILE: examples/domain_adaptation/image_regression/dann.py function main (line 35) | def main(args: argparse.Namespace): function train (line 156) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_regression/dd.py function main (line 33) | def main(args: argparse.Namespace): function train (line 187) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_regression/erm.py function main (line 33) | def main(args: argparse.Namespace): function train (line 141) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_regression/rsd.py function main (line 34) | def main(args: argparse.Namespace): function train (line 153) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/image_regression/utils.py function convert_model (line 16) | def convert_model(module): function validate (line 31) | def validate(val_loader, model, args, factors, device): FILE: examples/domain_adaptation/keypoint_detection/erm.py function main (line 34) | def main(args: argparse.Namespace): function train (line 169) | def train(train_source_iter, train_target_iter, model, criterion, function validate (line 222) | def validate(val_loader, model, criterion, visualize, args: argparse.Nam... FILE: examples/domain_adaptation/keypoint_detection/regda.py function main (line 36) | def main(args: argparse.Namespace): function pretrain (line 227) | def pretrain(train_source_iter, model, criterion, optimizer, function train (line 277) | def train(train_source_iter, train_target_iter, model, criterion,regress... function validate (line 379) | def validate(val_loader, model, criterion, visualize, args: argparse.Nam... FILE: examples/domain_adaptation/keypoint_detection/regda_fast.py function main (line 36) | def main(args: argparse.Namespace): function pretrain (line 227) | def pretrain(train_source_iter, model, criterion, optimizer, function train (line 277) | def train(train_source_iter, train_target_iter, model, criterion,regress... function validate (line 379) | def validate(val_loader, model, criterion, visualize, args: argparse.Nam... FILE: examples/domain_adaptation/object_detection/cycle_gan.py function make_power_2 (line 43) | def make_power_2(img, base, method=Image.BICUBIC): class VOCImageFolder (line 52) | class VOCImageFolder(datasets.VisionDataset): method __init__ (line 56) | def __init__(self, root: str, phase='trainval', method __getitem__ (line 64) | def __getitem__(self, index: int) -> Tuple[Any, str]: method __len__ (line 76) | def __len__(self) -> int: method parse_data_file (line 79) | def parse_data_file(self, file_name: str, extension: str) -> List[str]: method translate (line 99) | def translate(self, transform: Callable, target_root: str, image_base=4): function main (line 119) | def main(args): function train (line 247) | def train(train_source_iter, train_target_iter, netG_S2T, netG_T2S, netD... function build_dataset (line 346) | def build_dataset(dataset_names, dataset_roots, transform): FILE: examples/domain_adaptation/object_detection/d_adapt/bbox_adaptation.py class BoxTransform (line 36) | class BoxTransform(nn.Module): method __init__ (line 37) | def __init__(self): method forward (line 42) | def forward(self, pred_delta, gt_classes, proposal_boxes): function iou_between (line 59) | def iou_between( function clamp_single (line 92) | def clamp_single(box, w, h): function clamp (line 101) | def clamp(boxes, widths, heights): class BoundingBoxAdaptor (line 109) | class BoundingBoxAdaptor: method __init__ (line 110) | def __init__(self, class_names, log, args): method load_checkpoint (line 157) | def load_checkpoint(self, path=None): method prepare_training_data (line 167) | def prepare_training_data(self, proposal_list: PersistentProposalList,... method prepare_validation_data (line 197) | def prepare_validation_data(self, proposal_list: PersistentProposalList): method prepare_test_data (line 218) | def prepare_test_data(self, proposal_list: PersistentProposalList): method predict (line 231) | def predict(self, data_loader): method validate_baseline (line 250) | def validate_baseline(self, val_loader): method validate (line 263) | def validate(val_loader, model, box_transform, args) -> float: method fit (line 300) | def fit(self, data_loader_source, data_loader_target, data_loader_vali... method get_parser (line 482) | def get_parser() -> argparse.ArgumentParser: FILE: examples/domain_adaptation/object_detection/d_adapt/category_adaptation.py class ConfidenceBasedDataSelector (line 41) | class ConfidenceBasedDataSelector: method __init__ (line 43) | def __init__(self, confidence_ratio=0.1, category_names=()): method extend (line 50) | def extend(self, categories, scores): method calculate (line 54) | def calculate(self): method whether_select (line 74) | def whether_select(self, categories, scores): class RobustCrossEntropyLoss (line 79) | class RobustCrossEntropyLoss(nn.CrossEntropyLoss): method __init__ (line 81) | def __init__(self, *args, offset=0.1, **kwargs): method forward (line 85) | def forward(self, input: Tensor, target: Tensor) -> Tensor: class CategoryAdaptor (line 90) | class CategoryAdaptor: method __init__ (line 91) | def __init__(self, class_names, log, args): method load_checkpoint (line 108) | def load_checkpoint(self): method prepare_training_data (line 116) | def prepare_training_data(self, proposal_list: List[Proposal], labeled... method prepare_validation_data (line 157) | def prepare_validation_data(self, proposal_list: List[Proposal]): method prepare_test_data (line 178) | def prepare_test_data(self, proposal_list: List[Proposal]): method fit (line 191) | def fit(self, data_loader_source, data_loader_target, data_loader_vali... method predict (line 318) | def predict(self, data_loader): method validate (line 335) | def validate(val_loader, model, class_names, args) -> float: method get_parser (line 377) | def get_parser() -> argparse.ArgumentParser: FILE: examples/domain_adaptation/object_detection/d_adapt/d_adapt.py function generate_proposals (line 39) | def generate_proposals(model, num_classes, dataset_names, cache_root, cfg): function generate_category_labels (line 55) | def generate_category_labels(prop, category_adaptor, cache_filename): function generate_bounding_box_labels (line 70) | def generate_bounding_box_labels(prop, bbox_adaptor, class_names, cache_... function train (line 87) | def train(model, logger, cfg, args, args_cls, args_box): function main (line 251) | def main(args, args_cls, args_box): FILE: examples/domain_adaptation/object_detection/prepare_cityscapes_to_voc.py function make_dir (line 16) | def make_dir(path): function polygon_to_bbox (line 25) | def polygon_to_bbox(polygon): function read_json (line 33) | def read_json(file): function save_xml (line 61) | def save_xml(img_path, img_shape, data, save_path): function prepare_cityscapes_to_voc (line 68) | def prepare_cityscapes_to_voc(cityscapes_dir, save_path, suffix, image_d... FILE: examples/domain_adaptation/object_detection/source_only.py function train (line 29) | def train(model, logger, cfg, args): function main (line 117) | def main(args): FILE: examples/domain_adaptation/object_detection/utils.py class PascalVOCDetectionPerClassEvaluator (line 37) | class PascalVOCDetectionPerClassEvaluator(PascalVOCDetectionEvaluator): method evaluate (line 48) | def evaluate(self): function validate (line 98) | def validate(model, logger, cfg, args): function build_dataset (line 116) | def build_dataset(dataset_categories, dataset_roots): function rgb2gray (line 127) | def rgb2gray(rgb): class Grayscale (line 131) | class Grayscale(Augmentation): method __init__ (line 132) | def __init__(self, brightness=0, contrast=0, saturation=0, hue=0): method get_transform (line 137) | def get_transform(self, image): function build_augmentation (line 141) | def build_augmentation(cfg, is_train): function setup (line 182) | def setup(args): function build_lr_scheduler (line 196) | def build_lr_scheduler( function get_model_names (line 234) | def get_model_names(): function get_model (line 242) | def get_model(model_name, pretrain=True): class VisualizerWithoutAreaSorting (line 258) | class VisualizerWithoutAreaSorting(Visualizer): method __init__ (line 265) | def __init__(self, *args, flip=False, **kwargs): method overlay_instances (line 269) | def overlay_instances( method draw_box (line 398) | def draw_box(self, box_coord, alpha=1, edge_color="g", line_style="-"): FILE: examples/domain_adaptation/object_detection/visualize.py function visualize (line 26) | def visualize(cfg, args, model): function setup (line 78) | def setup(args): function main (line 92) | def main(args): FILE: examples/domain_adaptation/openset_domain_adaptation/dann.py function main (line 34) | def main(args: argparse.Namespace): function train (line 136) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... function validate (line 200) | def validate(val_loader: DataLoader, model: Classifier, args: argparse.N... FILE: examples/domain_adaptation/openset_domain_adaptation/erm.py function main (line 32) | def main(args: argparse.Namespace): function train (line 128) | def train(train_source_iter: ForeverDataIterator, model: Classifier, opt... function validate (line 177) | def validate(val_loader: DataLoader, model: Classifier, args: argparse.N... FILE: examples/domain_adaptation/openset_domain_adaptation/osbp.py function main (line 32) | def main(args: argparse.Namespace): function train (line 130) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... function validate (line 191) | def validate(val_loader: DataLoader, model: Classifier, args: argparse.N... FILE: examples/domain_adaptation/openset_domain_adaptation/utils.py function get_model_names (line 13) | def get_model_names(): function get_model (line 21) | def get_model(model_name): function get_dataset_names (line 39) | def get_dataset_names(): function get_dataset (line 46) | def get_dataset(dataset_name, root, source, target, train_source_transfo... function get_train_transform (line 66) | def get_train_transform(resizing='default', random_horizontal_flip=True,... function get_val_transform (line 127) | def get_val_transform(resizing='default'): FILE: examples/domain_adaptation/partial_domain_adaptation/afn.py function main (line 34) | def main(args: argparse.Namespace): function train (line 132) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/partial_domain_adaptation/dann.py function main (line 35) | def main(args: argparse.Namespace): function train (line 140) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/partial_domain_adaptation/erm.py function main (line 33) | def main(args: argparse.Namespace): function train (line 128) | def train(train_source_iter: ForeverDataIterator, model: Classifier, opt... FILE: examples/domain_adaptation/partial_domain_adaptation/iwan.py function main (line 37) | def main(args: argparse.Namespace): function train (line 147) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/partial_domain_adaptation/pada.py function main (line 36) | def main(args: argparse.Namespace): function train (line 142) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/partial_domain_adaptation/utils.py function get_model_names (line 18) | def get_model_names(): function get_model (line 26) | def get_model(model_name): function get_dataset_names (line 44) | def get_dataset_names(): function get_dataset (line 51) | def get_dataset(dataset_name, root, source, target, train_source_transfo... function validate (line 70) | def validate(val_loader, model, args, device) -> float: function get_train_transform (line 117) | def get_train_transform(resizing='default', random_horizontal_flip=True,... function get_val_transform (line 173) | def get_val_transform(resizing='default'): FILE: examples/domain_adaptation/re_identification/baseline.py function main (line 35) | def main(args: argparse.Namespace): function train (line 173) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/re_identification/baseline_cluster.py function main (line 36) | def main(args: argparse.Namespace): function run_kmeans (line 168) | def run_kmeans(cluster_loader: DataLoader, model: DataParallel, target_d... function run_dbscan (line 199) | def run_dbscan(cluster_loader: DataLoader, model: DataParallel, target_d... function train (line 243) | def train(train_target_iter: ForeverDataIterator, model, optimizer, crit... FILE: examples/domain_adaptation/re_identification/mmt.py function main (line 37) | def main(args: argparse.Namespace): function create_model (line 179) | def create_model(args: argparse.Namespace, pretrained_model_path: str): function run_kmeans (line 195) | def run_kmeans(cluster_loader: DataLoader, model_1: DataParallel, model_... function run_dbscan (line 237) | def run_dbscan(cluster_loader: DataLoader, model_1: DataParallel, model_... function train (line 297) | def train(train_target_iter: ForeverDataIterator, model_1: DataParallel,... FILE: examples/domain_adaptation/re_identification/spgan.py function main (line 36) | def main(args): function train (line 192) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... FILE: examples/domain_adaptation/re_identification/utils.py function copy_state_dict (line 21) | def copy_state_dict(model, state_dict, strip=None): function get_model_names (line 47) | def get_model_names(): function get_model (line 55) | def get_model(model_name): function get_train_transform (line 74) | def get_train_transform(height, width, resizing='default', random_horizo... function get_val_transform (line 108) | def get_val_transform(height, width): function visualize_tsne (line 116) | def visualize_tsne(source_loader, target_loader, model, filename, device... function k_reciprocal_neigh (line 134) | def k_reciprocal_neigh(initial_rank, i, k1): function compute_rerank_dist (line 144) | def compute_rerank_dist(target_features, k1=30, k2=6): FILE: examples/domain_adaptation/semantic_segmentation/advent.py function main (line 36) | def main(args: argparse.Namespace): function train (line 184) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... function validate (line 276) | def validate(val_loader: DataLoader, model, interp, criterion, visualize... FILE: examples/domain_adaptation/semantic_segmentation/cycada.py function main (line 36) | def main(args): function train (line 198) | def train(train_source_iter, train_target_iter, netG_S2T, netG_T2S, netD... FILE: examples/domain_adaptation/semantic_segmentation/cycle_gan.py function main (line 34) | def main(args): function train (line 168) | def train(train_source_iter, train_target_iter, netG_S2T, netG_T2S, netD... FILE: examples/domain_adaptation/semantic_segmentation/erm.py function main (line 34) | def main(args: argparse.Namespace): function train (line 161) | def train(train_source_iter: ForeverDataIterator, model, interp, criteri... function validate (line 217) | def validate(val_loader: DataLoader, model, interp, criterion, visualize... FILE: examples/domain_adaptation/semantic_segmentation/fda.py function robust_entropy (line 39) | def robust_entropy(y, ita=1.5, num_classes=19, reduction='mean'): function main (line 71) | def main(args: argparse.Namespace): function train (line 215) | def train(train_source_iter: ForeverDataIterator, train_target_iter: For... function validate (line 296) | def validate(val_loader: DataLoader, model, interp, criterion, visualize... FILE: examples/domain_adaptation/wilds_image_classification/cdan.py function main (line 42) | def main(args): function train (line 230) | def train(train_labeled_loader, train_unlabeled_loader, model, criterion... FILE: examples/domain_adaptation/wilds_image_classification/dan.py function main (line 42) | def main(args): function train (line 221) | def train(train_labeled_loader, train_unlabeled_loader, model, criterion... FILE: examples/domain_adaptation/wilds_image_classification/dann.py function main (line 42) | def main(args): function train (line 223) | def train(train_labeled_loader, train_unlabeled_loader, model, criterion... FILE: examples/domain_adaptation/wilds_image_classification/erm.py function main (line 41) | def main(args): function train (line 213) | def train(train_loader, model, criterion, optimizer, epoch, writer, args): FILE: examples/domain_adaptation/wilds_image_classification/fixmatch.py class ImageClassifier (line 43) | class ImageClassifier(Classifier): method __init__ (line 44) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... method forward (line 52) | def forward(self, x: torch.Tensor): function main (line 60) | def main(args): function train (line 247) | def train(train_labeled_loader, train_unlabeled_loader, model, criterion... FILE: examples/domain_adaptation/wilds_image_classification/jan.py function main (line 43) | def main(args): function train (line 225) | def train(train_labeled_loader, train_unlabeled_loader, model, criterion... FILE: examples/domain_adaptation/wilds_image_classification/mdd.py function main (line 42) | def main(args): function train (line 216) | def train(train_labeled_loader, train_unlabeled_loader, model, criterion... FILE: examples/domain_adaptation/wilds_image_classification/utils.py function get_model_names (line 31) | def get_model_names(): function get_model (line 35) | def get_model(model_name, pretrain=True): function get_dataset (line 47) | def get_dataset(dataset_name, root, unlabeled_list=("test_unlabeled",), ... function collate_list (line 82) | def collate_list(vec): function get_train_transform (line 106) | def get_train_transform(img_size, scale=None, ratio=None, hflip=0.5, vfl... function get_val_transform (line 154) | def get_val_transform(img_size=224, crop_pct=None, interpolation='biline... function _pil_interp (line 175) | def _pil_interp(method): function validate (line 187) | def validate(val_dataset, model, epoch, writer, args): function reduce_tensor (line 267) | def reduce_tensor(tensor, world_size): function matplotlib_imshow (line 274) | def matplotlib_imshow(img): function plot_classes_preds (line 281) | def plot_classes_preds(images, labels, outputs, class_names, metadata, m... function get_domain_names (line 309) | def get_domain_names(metadata, metadata_map): function get_domain_ids (line 313) | def get_domain_ids(metadata): FILE: examples/domain_adaptation/wilds_ogb_molpcba/erm.py function main (line 21) | def main(args): function train (line 103) | def train(train_loader, model, criterion, optimizer, epoch, writer, args): FILE: examples/domain_adaptation/wilds_ogb_molpcba/gin.py class GINVirtual (line 16) | class GINVirtual(torch.nn.Module): method __init__ (line 33) | def __init__(self, num_tasks=128, num_layers=5, emb_dim=300, dropout=0... method forward (line 58) | def forward(self, batched_data): class GINVirtualNode (line 69) | class GINVirtualNode(torch.nn.Module): method __init__ (line 85) | def __init__(self, num_layers, emb_dim, dropout=0.5): method forward (line 118) | def forward(self, batched_data): class GINConv (line 155) | class GINConv(MessagePassing): method __init__ (line 170) | def __init__(self, emb_dim): method forward (line 179) | def forward(self, x, edge_index, edge_attr): method message (line 185) | def message(self, x_j, edge_attr): method update (line 188) | def update(self, aggr_out): function gin_virtual (line 192) | def gin_virtual(num_tasks, dropout=0.5): FILE: examples/domain_adaptation/wilds_ogb_molpcba/utils.py function reduced_bce_logit_loss (line 19) | def reduced_bce_logit_loss(y_pred, y_target): function get_dataset (line 33) | def get_dataset(dataset_name, root, unlabeled_list=('test_unlabeled',), ... function get_model_names (line 71) | def get_model_names(): function get_model (line 76) | def get_model(arch, num_classes): function collate_list (line 84) | def collate_list(vec): function validate (line 108) | def validate(val_dataset, model, epoch, writer, args): FILE: examples/domain_adaptation/wilds_poverty/erm.py function main (line 32) | def main(args): function train (line 179) | def train(train_loader, model, optimizer, epoch, writer, args): FILE: examples/domain_adaptation/wilds_poverty/resnet_ms.py class ResNetMS (line 14) | class ResNetMS(models.ResNet): method __init__ (line 19) | def __init__(self, in_channels, *args, **kwargs): method forward (line 26) | def forward(self, x): method out_features (line 43) | def out_features(self) -> int: method copy_head (line 47) | def copy_head(self) -> nn.Module: function resnet18_ms (line 52) | def resnet18_ms(num_channels=3): function resnet34_ms (line 57) | def resnet34_ms(num_channels=3): function resnet50_ms (line 62) | def resnet50_ms(num_channels=3): function resnet101_ms (line 67) | def resnet101_ms(num_channels=3): function resnet152_ms (line 72) | def resnet152_ms(num_channels=3): FILE: examples/domain_adaptation/wilds_poverty/utils.py class Regressor (line 22) | class Regressor(nn.Module): method __init__ (line 56) | def __init__(self, backbone: nn.Module, bottleneck: Optional[nn.Module... method features_dim (line 82) | def features_dim(self) -> int: method forward (line 86) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: method get_parameters (line 96) | def get_parameters(self, base_lr=1.0) -> List[Dict]: function get_dataset (line 109) | def get_dataset(dataset_name, root, unlabeled_list=("test_unlabeled",), ... function get_model_names (line 143) | def get_model_names(): function get_model (line 148) | def get_model(arch, num_channels): function collate_list (line 156) | def collate_list(vec): function reduce_tensor (line 180) | def reduce_tensor(tensor, world_size): function validate (line 187) | def validate(val_dataset, model, epoch, writer, args): FILE: examples/domain_adaptation/wilds_text/erm.py function main (line 28) | def main(args): function train (line 133) | def train(train_loader, model, criterion, optimizer, epoch, writer, args): FILE: examples/domain_adaptation/wilds_text/utils.py class DistilBertClassifier (line 20) | class DistilBertClassifier(DistilBertForSequenceClassification): method __call__ (line 25) | def __call__(self, x): function get_transform (line 35) | def get_transform(arch, max_token_length): function get_dataset (line 64) | def get_dataset(dataset_name, root, unlabeled_list=('extra_unlabeled',),... function get_model_names (line 99) | def get_model_names(): function get_model (line 103) | def get_model(arch, num_classes): function reduce_tensor (line 111) | def reduce_tensor(tensor, world_size): function collate_list (line 118) | def collate_list(vec): function validate (line 142) | def validate(val_dataset, model, epoch, writer, args): FILE: examples/domain_generalization/image_classification/coral.py function main (line 31) | def main(args: argparse.Namespace): function train (line 144) | def train(train_iter: ForeverDataIterator, model, optimizer, lr_schedule... FILE: examples/domain_generalization/image_classification/erm.py function main (line 30) | def main(args: argparse.Namespace): function train (line 138) | def train(train_iter: ForeverDataIterator, model, optimizer, lr_schedule... FILE: examples/domain_generalization/image_classification/groupdro.py function main (line 32) | def main(args: argparse.Namespace): function train (line 143) | def train(train_iter: ForeverDataIterator, model, optimizer, lr_schedule... FILE: examples/domain_generalization/image_classification/irm.py class InvariancePenaltyLoss (line 32) | class InvariancePenaltyLoss(nn.Module): method __init__ (line 48) | def __init__(self): method forward (line 52) | def forward(self, y: torch.Tensor, labels: torch.Tensor) -> torch.Tensor: function main (line 61) | def main(args: argparse.Namespace): function train (line 182) | def train(train_iter: ForeverDataIterator, model, optimizer, lr_schedule... FILE: examples/domain_generalization/image_classification/mixstyle.py function main (line 31) | def main(args: argparse.Namespace): function train (line 141) | def train(train_iter: ForeverDataIterator, model, optimizer, FILE: examples/domain_generalization/image_classification/mldg.py function main (line 31) | def main(args: argparse.Namespace): function random_split (line 140) | def random_split(x_list, labels_list, n_domains_per_batch, n_support_dom... function train (line 152) | def train(train_iter: ForeverDataIterator, model, optimizer, lr_schedule... FILE: examples/domain_generalization/image_classification/utils.py function get_model_names (line 28) | def get_model_names(): function get_model (line 36) | def get_model(model_name): function get_dataset_names (line 55) | def get_dataset_names(): class ConcatDatasetWithDomainLabel (line 62) | class ConcatDatasetWithDomainLabel(ConcatDataset): method __init__ (line 65) | def __init__(self, *args, **kwargs): method __getitem__ (line 76) | def __getitem__(self, index): function get_dataset (line 82) | def get_dataset(dataset_name, root, task_list, split='train', download=T... function split_dataset (line 131) | def split_dataset(dataset, n, seed=0): function validate (line 145) | def validate(val_loader, model, args, device) -> float: function get_train_transform (line 184) | def get_train_transform(resizing='default', random_horizontal_flip=True,... function get_val_transform (line 246) | def get_val_transform(resizing='default'): function collect_feature (line 271) | def collect_feature(data_loader, feature_extractor: nn.Module, device: t... class ImageClassifier (line 299) | class ImageClassifier(ClassifierBase): method __init__ (line 311) | def __init__(self, backbone: nn.Module, num_classes: int, freeze_bn=Fa... method forward (line 317) | def forward(self, x: torch.Tensor): method train (line 328) | def train(self, mode=True): class RandomDomainSampler (line 336) | class RandomDomainSampler(Sampler): method __init__ (line 346) | def __init__(self, data_source: ConcatDataset, batch_size: int, n_doma... method __iter__ (line 363) | def __iter__(self): method __len__ (line 389) | def __len__(self): FILE: examples/domain_generalization/image_classification/vrex.py function main (line 30) | def main(args: argparse.Namespace): function train (line 147) | def train(train_iter: ForeverDataIterator, model, optimizer, lr_schedule... FILE: examples/domain_generalization/re_identification/baseline.py function main (line 35) | def main(args: argparse.Namespace): function train (line 169) | def train(train_iter: ForeverDataIterator, model, criterion_ce: CrossEnt... FILE: examples/domain_generalization/re_identification/mixstyle.py function main (line 37) | def main(args: argparse.Namespace): function train (line 172) | def train(train_iter: ForeverDataIterator, model, criterion_ce: CrossEnt... FILE: examples/domain_generalization/re_identification/utils.py function get_model_names (line 18) | def get_model_names(): function get_model (line 26) | def get_model(model_name): function get_train_transform (line 45) | def get_train_transform(height, width, resizing='default', random_horizo... function get_val_transform (line 77) | def get_val_transform(height, width): function visualize_tsne (line 85) | def visualize_tsne(source_loader, target_loader, model, filename, device... FILE: examples/model_selection/hscore.py function main (line 23) | def main(args): FILE: examples/model_selection/leep.py function main (line 23) | def main(args): FILE: examples/model_selection/logme.py function main (line 23) | def main(args): FILE: examples/model_selection/nce.py function main (line 23) | def main(args): FILE: examples/model_selection/utils.py class Logger (line 19) | class Logger(object): method __init__ (line 27) | def __init__(self, data_name, model_name, metric_name, stream=sys.stdo... method write (line 34) | def write(self, message): method get_save_dir (line 39) | def get_save_dir(self): method get_result_dir (line 42) | def get_result_dir(self): method flush (line 45) | def flush(self): method close (line 49) | def close(self): function get_model_names (line 54) | def get_model_names(): function forwarding_dataset (line 62) | def forwarding_dataset(score_loader, model, layer, device): function get_model (line 102) | def get_model(model_name, pretrained=True, pretrained_checkpoint=None): function get_dataset (line 116) | def get_dataset(dataset_name, root, transform, sample_rate=100, num_samp... function get_transform (line 140) | def get_transform(resizing='res.'): FILE: examples/semi_supervised_learning/image_classification/debiasmatch.py function main (line 30) | def main(args: argparse.Namespace): function train (line 131) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/dst.py function main (line 31) | def main(args: argparse.Namespace): function train (line 129) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/erm.py function main (line 29) | def main(args: argparse.Namespace): FILE: examples/semi_supervised_learning/image_classification/fixmatch.py function main (line 30) | def main(args: argparse.Namespace): function train (line 128) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/flexmatch.py function main (line 30) | def main(args: argparse.Namespace): function train (line 135) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/mean_teacher.py function main (line 31) | def main(args: argparse.Namespace): function train (line 130) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/noisy_student.py class ImageClassifier (line 32) | class ImageClassifier(Classifier): method __init__ (line 33) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... method forward (line 45) | def forward(self, x: torch.Tensor): function calc_teacher_output (line 55) | def calc_teacher_output(classifier_teacher: ImageClassifier, weak_augmen... function main (line 89) | def main(args: argparse.Namespace): function train (line 213) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/pi_model.py function main (line 30) | def main(args: argparse.Namespace): function train (line 128) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/pseudo_label.py function main (line 30) | def main(args: argparse.Namespace): function train (line 128) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/self_tuning.py function main (line 29) | def main(args: argparse.Namespace): function train (line 129) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/uda.py function main (line 30) | def main(args: argparse.Namespace): function train (line 128) | def train(labeled_train_iter: ForeverDataIterator, unlabeled_train_iter:... FILE: examples/semi_supervised_learning/image_classification/utils.py function get_model_names (line 28) | def get_model_names(): function get_model (line 36) | def get_model(model_name, pretrained=True, pretrained_checkpoint=None): function get_dataset_names (line 56) | def get_dataset_names(): function get_dataset (line 63) | def get_dataset(dataset_name, num_samples_per_class, root, labeled_train... function x_u_split (line 100) | def x_u_split(num_samples_per_class, num_classes, labels, seed): function get_train_transform (line 121) | def get_train_transform(resizing='default', random_horizontal_flip=True,... function get_val_transform (line 152) | def get_val_transform(resizing='default', norm_mean=(0.485, 0.456, 0.406... function convert_dataset (line 169) | def convert_dataset(dataset): class ImageClassifier (line 188) | class ImageClassifier(Classifier): method __init__ (line 189) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... method forward (line 200) | def forward(self, x: torch.Tensor): function get_cosine_scheduler_with_warmup (line 207) | def get_cosine_scheduler_with_warmup(optimizer, T_max, num_cycles=7. / 1... function validate (line 234) | def validate(val_loader, model, args, device, num_classes): function empirical_risk_minimization (line 281) | def empirical_risk_minimization(labeled_train_iter, model, optimizer, lr... FILE: examples/task_adaptation/image_classification/bi_tuning.py function main (line 28) | def main(args: argparse.Namespace): function train (line 110) | def train(train_iter: ForeverDataIterator, bituning: BiTuning, optimizer... FILE: examples/task_adaptation/image_classification/bss.py function main (line 29) | def main(args: argparse.Namespace): function train (line 99) | def train(train_iter: ForeverDataIterator, model: Classifier, bss_module... FILE: examples/task_adaptation/image_classification/co_tuning.py function get_dataset (line 31) | def get_dataset(dataset_name, root, train_transform, val_transform, samp... function main (line 54) | def main(args: argparse.Namespace): function train (line 132) | def train(train_iter: ForeverDataIterator, model: Classifier, optimizer:... FILE: examples/task_adaptation/image_classification/delta.py function main (line 32) | def main(args: argparse.Namespace): function calculate_channel_attention (line 142) | def calculate_channel_attention(dataset, return_layers, num_classes, args): function train (line 233) | def train(train_iter: ForeverDataIterator, model: Classifier, backbone_r... FILE: examples/task_adaptation/image_classification/erm.py function main (line 28) | def main(args: argparse.Namespace): function train (line 99) | def train(train_iter: ForeverDataIterator, model: Classifier, optimizer:... FILE: examples/task_adaptation/image_classification/lwf.py function main (line 29) | def main(args: argparse.Namespace): function train (line 105) | def train(train_iter: ForeverDataIterator, model: Classifier, kd, optimi... FILE: examples/task_adaptation/image_classification/stochnorm.py function main (line 29) | def main(args: argparse.Namespace): function train (line 101) | def train(train_iter: ForeverDataIterator, model: Classifier, optimizer:... FILE: examples/task_adaptation/image_classification/utils.py function get_model_names (line 27) | def get_model_names(): function get_model (line 35) | def get_model(model_name, pretrained_checkpoint=None): function get_dataset (line 57) | def get_dataset(dataset_name, root, train_transform, val_transform, samp... function validate (line 82) | def validate(val_loader, model, args, device, visualize=None) -> float: function get_train_transform (line 123) | def get_train_transform(resizing='default', random_horizontal_flip=True,... function get_val_transform (line 170) | def get_val_transform(resizing='default'): function get_optimizer (line 199) | def get_optimizer(optimizer_name, params, lr, wd, momentum): function visualize (line 219) | def visualize(image, filename): FILE: tllib/alignment/adda.py class DomainAdversarialLoss (line 12) | class DomainAdversarialLoss(nn.Module): method __init__ (line 31) | def __init__(self): method forward (line 34) | def forward(self, domain_pred, domain_label='source'): class ImageClassifier (line 42) | class ImageClassifier(ClassifierBase): method __init__ (line 43) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... method freeze_bn (line 53) | def freeze_bn(self): method get_parameters (line 58) | def get_parameters(self, base_lr=1.0, optimize_head=True) -> List[Dict]: FILE: tllib/alignment/advent.py class Discriminator (line 11) | class Discriminator(nn.Sequential): method __init__ (line 27) | def __init__(self, num_classes, ndf=64): function prob_2_entropy (line 41) | def prob_2_entropy(prob): function bce_loss (line 48) | def bce_loss(y_pred, y_label): class DomainAdversarialEntropyLoss (line 55) | class DomainAdversarialEntropyLoss(nn.Module): method __init__ (line 82) | def __init__(self, discriminator: nn.Module): method forward (line 86) | def forward(self, logits, domain_label='source'): method train (line 98) | def train(self, mode=True): method eval (line 110) | def eval(self): FILE: tllib/alignment/bsp.py class BatchSpectralPenalizationLoss (line 11) | class BatchSpectralPenalizationLoss(nn.Module): method __init__ (line 43) | def __init__(self): method forward (line 46) | def forward(self, f_s, f_t): class ImageClassifier (line 53) | class ImageClassifier(ClassifierBase): method __init__ (line 54) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/alignment/cdan.py class ConditionalDomainAdversarialLoss (line 20) | class ConditionalDomainAdversarialLoss(nn.Module): method __init__ (line 80) | def __init__(self, domain_discriminator: nn.Module, entropy_conditioni... method forward (line 101) | def forward(self, g_s: torch.Tensor, f_s: torch.Tensor, g_t: torch.Ten... class RandomizedMultiLinearMap (line 133) | class RandomizedMultiLinearMap(nn.Module): method __init__ (line 155) | def __init__(self, features_dim: int, num_classes: int, output_dim: Op... method forward (line 161) | def forward(self, f: torch.Tensor, g: torch.Tensor) -> torch.Tensor: class MultiLinearMap (line 168) | class MultiLinearMap(nn.Module): method __init__ (line 177) | def __init__(self): method forward (line 180) | def forward(self, f: torch.Tensor, g: torch.Tensor) -> torch.Tensor: class ImageClassifier (line 186) | class ImageClassifier(ClassifierBase): method __init__ (line 187) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/alignment/coral.py class CorrelationAlignmentLoss (line 9) | class CorrelationAlignmentLoss(nn.Module): method __init__ (line 37) | def __init__(self): method forward (line 40) | def forward(self, f_s: torch.Tensor, f_t: torch.Tensor) -> torch.Tensor: FILE: tllib/alignment/d_adapt/feedback.py function load_feedbacks_into_dataset (line 24) | def load_feedbacks_into_dataset(dataset_dicts, proposals_list: List[Prop... function get_detection_dataset_dicts (line 66) | def get_detection_dataset_dicts(names, filter_empty=True, min_keypoints=... function transform_feedbacks (line 111) | def transform_feedbacks(dataset_dict, image_shape, transforms, *, min_bo... class DatasetMapper (line 165) | class DatasetMapper: method __init__ (line 183) | def __init__( method from_config (line 231) | def from_config(cls, cfg, is_train: bool = True): method __call__ (line 260) | def __call__(self, dataset_dict): FILE: tllib/alignment/d_adapt/modeling/matcher.py class MaxOverlapMatcher (line 11) | class MaxOverlapMatcher(object): method __init__ (line 18) | def __init__(self): method __call__ (line 21) | def __call__(self, match_quality_matrix): FILE: tllib/alignment/d_adapt/modeling/meta_arch/rcnn.py class DecoupledGeneralizedRCNN (line 19) | class DecoupledGeneralizedRCNN(TLGeneralizedRCNN): method __init__ (line 60) | def __init__(self, *args, **kwargs): method forward (line 63) | def forward(self, batched_inputs: Tuple[Dict[str, torch.Tensor]], labe... method visualize_training (line 93) | def visualize_training(self, batched_inputs, proposals, feedbacks=None): method inference (line 148) | def inference( FILE: tllib/alignment/d_adapt/modeling/meta_arch/retinanet.py class DecoupledRetinaNet (line 23) | class DecoupledRetinaNet(TLRetinaNet): method __init__ (line 92) | def __init__(self, *args, max_samples_per_level=25, **kwargs): method forward_training (line 97) | def forward_training(self, images, features, predictions, gt_instances... method forward (line 112) | def forward(self, batched_inputs: Tuple[Dict[str, Tensor]], labeled=Tr... method label_pseudo_anchors (line 156) | def label_pseudo_anchors(self, anchors, instances): method sample_background (line 199) | def sample_background( method sample_background_single_image (line 217) | def sample_background_single_image( method visualize_training (line 255) | def visualize_training(self, batched_inputs, results, feedbacks=None): FILE: tllib/alignment/d_adapt/modeling/roi_heads/fast_rcnn.py function label_smoothing_cross_entropy (line 18) | def label_smoothing_cross_entropy(input, target, *, reduction="mean", **... class DecoupledFastRCNNOutputLayers (line 28) | class DecoupledFastRCNNOutputLayers(FastRCNNOutputLayers): method losses (line 38) | def losses(self, predictions, proposals): FILE: tllib/alignment/d_adapt/modeling/roi_heads/roi_heads.py class DecoupledRes5ROIHeads (line 27) | class DecoupledRes5ROIHeads(Res5ROIHeads): method __init__ (line 40) | def __init__(self, *args, **kwargs): method from_config (line 44) | def from_config(cls, cfg, input_shape): method forward (line 52) | def forward(self, images, features, proposals, targets=None, feedbacks... method label_and_sample_feedbacks (line 148) | def label_and_sample_feedbacks( class DecoupledStandardROIHeads (line 211) | class DecoupledStandardROIHeads(StandardROIHeads): method __init__ (line 226) | def __init__(self, *args, **kwargs): method from_config (line 230) | def from_config(cls, cfg, input_shape): method forward (line 237) | def forward(self, images, features, proposals, targets=None, feedbacks... method _forward_box (line 323) | def _forward_box(self, features: Dict[str, torch.Tensor], proposals: L... method label_and_sample_feedbacks (line 362) | def label_and_sample_feedbacks( function fast_rcnn_sample_background (line 421) | def fast_rcnn_sample_background( function fast_rcnn_sample_background_single_image (line 463) | def fast_rcnn_sample_background_single_image( FILE: tllib/alignment/d_adapt/proposal.py class ProposalMapper (line 24) | class ProposalMapper(DatasetMapper): method __call__ (line 40) | def __call__(self, dataset_dict): class ProposalGenerator (line 91) | class ProposalGenerator(DatasetEvaluator): method __init__ (line 99) | def __init__(self, iou_threshold=(0.4, 0.5), num_classes=20, *args, **... method process_type (line 106) | def process_type(self, inputs, outputs, type='instances'): method process (line 143) | def process(self, inputs, outputs): method evaluate (line 147) | def evaluate(self): class Proposal (line 151) | class Proposal: method __init__ (line 167) | def __init__(self, image_id, filename, pred_boxes, pred_classes, pred_... method to_dict (line 179) | def to_dict(self): method __str__ (line 193) | def __str__(self): method __len__ (line 197) | def __len__(self): method __getitem__ (line 200) | def __getitem__(self, item): class ProposalEncoder (line 214) | class ProposalEncoder(json.JSONEncoder): method default (line 215) | def default(self, obj): function asProposal (line 221) | def asProposal(dict): class PersistentProposalList (line 237) | class PersistentProposalList(list): method __init__ (line 244) | def __init__(self, filename=None): method load (line 248) | def load(self): method flush (line 263) | def flush(self): function flatten (line 273) | def flatten(proposal_list, max_number=10000): class ProposalDataset (line 289) | class ProposalDataset(datasets.VisionDataset): method __init__ (line 299) | def __init__(self, proposal_list: List[Proposal], transform: Optional[... method __getitem__ (line 305) | def __getitem__(self, index: int): method __len__ (line 340) | def __len__(self): class ExpandCrop (line 344) | class ExpandCrop: method __init__ (line 349) | def __init__(self, expand=1.): method __call__ (line 352) | def __call__(self, img, top, left, height, width): FILE: tllib/alignment/dan.py class MultipleKernelMaximumMeanDiscrepancy (line 15) | class MultipleKernelMaximumMeanDiscrepancy(nn.Module): method __init__ (line 72) | def __init__(self, kernels: Sequence[nn.Module], linear: Optional[bool... method forward (line 78) | def forward(self, z_s: torch.Tensor, z_t: torch.Tensor) -> torch.Tensor: function _update_index_matrix (line 92) | def _update_index_matrix(batch_size: int, index_matrix: Optional[torch.T... class ImageClassifier (line 122) | class ImageClassifier(ClassifierBase): method __init__ (line 123) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/alignment/dann.py class DomainAdversarialLoss (line 17) | class DomainAdversarialLoss(nn.Module): method __init__ (line 59) | def __init__(self, domain_discriminator: nn.Module, reduction: Optiona... method forward (line 70) | def forward(self, f_s: torch.Tensor, f_t: torch.Tensor, class ImageClassifier (line 110) | class ImageClassifier(ClassifierBase): method __init__ (line 111) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/alignment/jan.py class JointMultipleKernelMaximumMeanDiscrepancy (line 19) | class JointMultipleKernelMaximumMeanDiscrepancy(nn.Module): method __init__ (line 69) | def __init__(self, kernels: Sequence[Sequence[nn.Module]], linear: Opt... method forward (line 79) | def forward(self, z_s: torch.Tensor, z_t: torch.Tensor) -> torch.Tensor: class Theta (line 96) | class Theta(nn.Module): method __init__ (line 101) | def __init__(self, dim: int): method forward (line 109) | def forward(self, features: torch.Tensor) -> torch.Tensor: class ImageClassifier (line 114) | class ImageClassifier(ClassifierBase): method __init__ (line 115) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/alignment/mcd.py function classifier_discrepancy (line 10) | def classifier_discrepancy(predictions1: torch.Tensor, predictions2: tor... function entropy (line 28) | def entropy(predictions: torch.Tensor) -> torch.Tensor: class ImageClassifierHead (line 46) | class ImageClassifierHead(nn.Module): method __init__ (line 59) | def __init__(self, in_features: int, num_classes: int, bottleneck_dim:... method forward (line 81) | def forward(self, inputs: torch.Tensor) -> torch.Tensor: FILE: tllib/alignment/mdd.py class MarginDisparityDiscrepancy (line 13) | class MarginDisparityDiscrepancy(nn.Module): method __init__ (line 60) | def __init__(self, source_disparity: Callable, target_disparity: Calla... method forward (line 68) | def forward(self, y_s: torch.Tensor, y_s_adv: torch.Tensor, y_t: torch... class ClassificationMarginDisparityDiscrepancy (line 88) | class ClassificationMarginDisparityDiscrepancy(MarginDisparityDiscrepancy): method __init__ (line 142) | def __init__(self, margin: Optional[float] = 4, **kwargs): class RegressionMarginDisparityDiscrepancy (line 155) | class RegressionMarginDisparityDiscrepancy(MarginDisparityDiscrepancy): method __init__ (line 209) | def __init__(self, margin: Optional[float] = 1, loss_function=F.l1_los... function shift_log (line 220) | def shift_log(x: torch.Tensor, offset: Optional[float] = 1e-6) -> torch.... class GeneralModule (line 239) | class GeneralModule(nn.Module): method __init__ (line 240) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck: ... method forward (line 253) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: method step (line 265) | def step(self): method get_parameters (line 271) | def get_parameters(self, base_lr=1.0) -> List[Dict]: class ImageClassifier (line 285) | class ImageClassifier(GeneralModule): method __init__ (line 321) | def __init__(self, backbone: nn.Module, num_classes: int, class ImageRegressor (line 365) | class ImageRegressor(GeneralModule): method __init__ (line 400) | def __init__(self, backbone: nn.Module, num_factors: int, bottleneck =... FILE: tllib/alignment/osbp.py class UnknownClassBinaryCrossEntropy (line 14) | class UnknownClassBinaryCrossEntropy(nn.Module): method __init__ (line 38) | def __init__(self, t: Optional[float]=0.5): method forward (line 42) | def forward(self, y): class ImageClassifier (line 54) | class ImageClassifier(ClassifierBase): method __init__ (line 55) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... method forward (line 71) | def forward(self, x: torch.Tensor, grad_reverse: Optional[bool] = False): FILE: tllib/alignment/regda.py class FastPseudoLabelGenerator2d (line 15) | class FastPseudoLabelGenerator2d(nn.Module): method __init__ (line 16) | def __init__(self, sigma=2): method forward (line 20) | def forward(self, heatmap: torch.Tensor): class PseudoLabelGenerator2d (line 34) | class PseudoLabelGenerator2d(nn.Module): method __init__ (line 57) | def __init__(self, num_keypoints, height=64, width=64, sigma=2): method forward (line 93) | def forward(self, y): class RegressionDisparity (line 105) | class RegressionDisparity(nn.Module): method __init__ (line 145) | def __init__(self, pseudo_label_generator: PseudoLabelGenerator2d, cri... method forward (line 150) | def forward(self, y, y_adv, weight=None, mode='min'): class PoseResNet2d (line 161) | class PoseResNet2d(nn.Module): method __init__ (line 192) | def __init__(self, backbone, upsampling, feature_dim, num_keypoints, method _make_head (line 203) | def _make_head(num_layers, channel_dim, num_keypoints): method forward (line 227) | def forward(self, x): method get_parameters (line 239) | def get_parameters(self, lr=1.): method step (line 247) | def step(self): FILE: tllib/alignment/rsd.py class RepresentationSubspaceDistance (line 9) | class RepresentationSubspaceDistance(nn.Module): method __init__ (line 22) | def __init__(self, trade_off=0.1): method forward (line 26) | def forward(self, f_s, f_t): FILE: tllib/modules/classifier.py class Classifier (line 12) | class Classifier(nn.Module): method __init__ (line 47) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck: ... method features_dim (line 74) | def features_dim(self) -> int: method forward (line 78) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: method get_parameters (line 88) | def get_parameters(self, base_lr=1.0) -> List[Dict]: class ImageClassifier (line 101) | class ImageClassifier(Classifier): FILE: tllib/modules/domain_discriminator.py class DomainDiscriminator (line 11) | class DomainDiscriminator(nn.Sequential): method __init__ (line 29) | def __init__(self, in_feature: int, hidden_size: int, batch_norm=True,... method get_parameters (line 58) | def get_parameters(self) -> List[Dict]: FILE: tllib/modules/entropy.py function entropy (line 8) | def entropy(predictions: torch.Tensor, reduction='none') -> torch.Tensor: FILE: tllib/modules/gl.py class GradientFunction (line 12) | class GradientFunction(Function): method forward (line 15) | def forward(ctx: Any, input: torch.Tensor, coeff: Optional[float] = 1.... method backward (line 21) | def backward(ctx: Any, grad_output: torch.Tensor) -> Tuple[torch.Tenso... class WarmStartGradientLayer (line 25) | class WarmStartGradientLayer(nn.Module): method __init__ (line 51) | def __init__(self, alpha: Optional[float] = 1.0, lo: Optional[float] =... method forward (line 61) | def forward(self, input: torch.Tensor) -> torch.Tensor: method step (line 71) | def step(self): FILE: tllib/modules/grl.py class GradientReverseFunction (line 12) | class GradientReverseFunction(Function): method forward (line 15) | def forward(ctx: Any, input: torch.Tensor, coeff: Optional[float] = 1.... method backward (line 21) | def backward(ctx: Any, grad_output: torch.Tensor) -> Tuple[torch.Tenso... class GradientReverseLayer (line 25) | class GradientReverseLayer(nn.Module): method __init__ (line 26) | def __init__(self): method forward (line 29) | def forward(self, *input): class WarmStartGradientReverseLayer (line 33) | class WarmStartGradientReverseLayer(nn.Module): method __init__ (line 59) | def __init__(self, alpha: Optional[float] = 1.0, lo: Optional[float] =... method forward (line 69) | def forward(self, input: torch.Tensor) -> torch.Tensor: method step (line 79) | def step(self): FILE: tllib/modules/kernels.py class GaussianKernel (line 13) | class GaussianKernel(nn.Module): method __init__ (line 48) | def __init__(self, sigma: Optional[float] = None, track_running_stats:... method forward (line 56) | def forward(self, X: torch.Tensor) -> torch.Tensor: FILE: tllib/modules/loss.py class LabelSmoothSoftmaxCEV1 (line 7) | class LabelSmoothSoftmaxCEV1(nn.Module): method __init__ (line 12) | def __init__(self, lb_smooth=0.1, reduction='mean', ignore_index=-1): method forward (line 19) | def forward(self, input, target): class KnowledgeDistillationLoss (line 50) | class KnowledgeDistillationLoss(nn.Module): method __init__ (line 69) | def __init__(self, T=1., reduction='batchmean'): method forward (line 74) | def forward(self, y_student, y_teacher): FILE: tllib/modules/regressor.py class Regressor (line 12) | class Regressor(nn.Module): method __init__ (line 41) | def __init__(self, backbone: nn.Module, num_factors: int, bottleneck: ... method features_dim (line 71) | def features_dim(self) -> int: method forward (line 75) | def forward(self, x: torch.Tensor) -> Tuple[torch.Tensor, torch.Tensor]: method get_parameters (line 85) | def get_parameters(self, base_lr=1.0) -> List[Dict]: FILE: tllib/normalization/afn.py class AdaptiveFeatureNorm (line 14) | class AdaptiveFeatureNorm(nn.Module): method __init__ (line 49) | def __init__(self, delta): method forward (line 53) | def forward(self, f: torch.Tensor) -> torch.Tensor: class Block (line 61) | class Block(nn.Module): method __init__ (line 82) | def __init__(self, in_features: int, bottleneck_dim: Optional[int] = 1... method forward (line 90) | def forward(self, x: torch.Tensor) -> torch.Tensor: class ImageClassifier (line 100) | class ImageClassifier(ClassfierBase): method __init__ (line 112) | def __init__(self, backbone: nn.Module, num_classes: int, num_blocks: ... method get_parameters (line 135) | def get_parameters(self, base_lr=1.0) -> List[Dict]: FILE: tllib/normalization/ibn.py class InstanceBatchNorm2d (line 25) | class InstanceBatchNorm2d(nn.Module): method __init__ (line 41) | def __init__(self, planes, ratio=0.5): method forward (line 47) | def forward(self, x): class BasicBlock (line 55) | class BasicBlock(nn.Module): method __init__ (line 58) | def __init__(self, inplanes, planes, ibn=None, stride=1, downsample=No... method forward (line 73) | def forward(self, x): class Bottleneck (line 94) | class Bottleneck(nn.Module): method __init__ (line 97) | def __init__(self, inplanes, planes, ibn=None, stride=1, downsample=No... method forward (line 114) | def forward(self, x): class IBNNet (line 139) | class IBNNet(nn.Module): method __init__ (line 144) | def __init__(self, block, layers, ibn_cfg=('a', 'a', 'a', None)): method _make_layer (line 169) | def _make_layer(self, block, planes, blocks, stride=1, ibn=None): method forward (line 189) | def forward(self, x): method out_features (line 204) | def out_features(self) -> int: function resnet18_ibn_a (line 209) | def resnet18_ibn_a(pretrained=False): function resnet34_ibn_a (line 223) | def resnet34_ibn_a(pretrained=False): function resnet50_ibn_a (line 237) | def resnet50_ibn_a(pretrained=False): function resnet101_ibn_a (line 251) | def resnet101_ibn_a(pretrained=False): function resnet18_ibn_b (line 265) | def resnet18_ibn_b(pretrained=False): function resnet34_ibn_b (line 279) | def resnet34_ibn_b(pretrained=False): function resnet50_ibn_b (line 293) | def resnet50_ibn_b(pretrained=False): function resnet101_ibn_b (line 307) | def resnet101_ibn_b(pretrained=False): FILE: tllib/normalization/mixstyle/__init__.py class MixStyle (line 11) | class MixStyle(nn.Module): method __init__ (line 34) | def __init__(self, p=0.5, alpha=0.1, eps=1e-6): method forward (line 41) | def forward(self, x): FILE: tllib/normalization/mixstyle/resnet.py function _resnet_with_mix_style (line 12) | def _resnet_with_mix_style(arch, block, layers, pretrained, progress, mi... function resnet18 (line 79) | def resnet18(pretrained=False, progress=True, **kwargs): function resnet34 (line 90) | def resnet34(pretrained=False, progress=True, **kwargs): function resnet50 (line 101) | def resnet50(pretrained=False, progress=True, **kwargs): function resnet101 (line 112) | def resnet101(pretrained=False, progress=True, **kwargs): FILE: tllib/normalization/mixstyle/sampler.py class RandomDomainMultiInstanceSampler (line 11) | class RandomDomainMultiInstanceSampler(Sampler): method __init__ (line 22) | def __init__(self, dataset, batch_size, n_domains_per_batch, num_insta... method __iter__ (line 42) | def __iter__(self): method sample_multi_instances (line 64) | def sample_multi_instances(self, sample_idxes): method __len__ (line 82) | def __len__(self): FILE: tllib/normalization/stochnorm.py class _StochNorm (line 15) | class _StochNorm(nn.Module): method __init__ (line 17) | def __init__(self, num_features, eps=1e-5, momentum=0.1, affine=True, ... method reset_parameters (line 40) | def reset_parameters(self): method _check_input_dim (line 48) | def _check_input_dim(self, input): method forward (line 51) | def forward(self, input): class StochNorm1d (line 87) | class StochNorm1d(_StochNorm): method _check_input_dim (line 136) | def _check_input_dim(self, input): class StochNorm2d (line 142) | class StochNorm2d(_StochNorm): method _check_input_dim (line 192) | def _check_input_dim(self, input): class StochNorm3d (line 198) | class StochNorm3d(_StochNorm): method _check_input_dim (line 248) | def _check_input_dim(self, input): function convert_model (line 254) | def convert_model(module, p): FILE: tllib/ranking/hscore.py function h_score (line 11) | def h_score(features: np.ndarray, labels: np.ndarray): function regularized_h_score (line 49) | def regularized_h_score(features: np.ndarray, labels: np.ndarray): FILE: tllib/ranking/leep.py function log_expected_empirical_prediction (line 11) | def log_expected_empirical_prediction(predictions: np.ndarray, labels: n... FILE: tllib/ranking/logme.py function log_maximum_evidence (line 11) | def log_maximum_evidence(features: np.ndarray, targets: np.ndarray, regr... function each_evidence (line 65) | def each_evidence(y_, f, fh, v, s, vh, N, D): FILE: tllib/ranking/nce.py function negative_conditional_entropy (line 10) | def negative_conditional_entropy(source_labels: np.ndarray, target_label... FILE: tllib/ranking/transrate.py function coding_rate (line 10) | def coding_rate(features: np.ndarray, eps=1e-4): function transrate (line 17) | def transrate(features: np.ndarray, labels: np.ndarray, eps=1e-4): FILE: tllib/regularization/bi_tuning.py class Classifier (line 11) | class Classifier(ClassifierBase): method __init__ (line 43) | def __init__(self, backbone: nn.Module, num_classes: int, projection_d... method forward (line 52) | def forward(self, x: torch.Tensor): method get_parameters (line 66) | def get_parameters(self, base_lr=1.0): class BiTuning (line 80) | class BiTuning(nn.Module): method __init__ (line 112) | def __init__(self, encoder_q: Classifier, encoder_k: Classifier, num_c... method _momentum_update_key_encoder (line 137) | def _momentum_update_key_encoder(self): method _dequeue_and_enqueue (line 145) | def _dequeue_and_enqueue(self, h, z, label): method forward (line 157) | def forward(self, im_q, im_k, labels): FILE: tllib/regularization/bss.py class BatchSpectralShrinkage (line 11) | class BatchSpectralShrinkage(nn.Module): method __init__ (line 40) | def __init__(self, k=1): method forward (line 44) | def forward(self, feature): FILE: tllib/regularization/co_tuning.py class CoTuningLoss (line 17) | class CoTuningLoss(nn.Module): method __init__ (line 32) | def __init__(self): method forward (line 35) | def forward(self, input: torch.Tensor, target: torch.Tensor) -> torch.... class Relationship (line 41) | class Relationship(object): method __init__ (line 51) | def __init__(self, data_loader, classifier, device, cache=None): method __getitem__ (line 64) | def __getitem__(self, category): method collect_labels (line 67) | def collect_labels(self): method get_category_relationship (line 91) | def get_category_relationship(self, source_probabilities, target_labels): class Classifier (line 111) | class Classifier(ClassifierBase): method __init__ (line 136) | def __init__(self, backbone: nn.Module, num_classes: int, head_source... method get_parameters (line 139) | def get_parameters(self, base_lr=1.0) -> List[Dict]: FILE: tllib/regularization/delta.py class L2Regularization (line 12) | class L2Regularization(nn.Module): method __init__ (line 24) | def __init__(self, model: nn.Module): method forward (line 28) | def forward(self): class SPRegularization (line 35) | class SPRegularization(nn.Module): method __init__ (line 55) | def __init__(self, source_model: nn.Module, target_model: nn.Module): method forward (line 62) | def forward(self): class BehavioralRegularization (line 69) | class BehavioralRegularization(nn.Module): method __init__ (line 92) | def __init__(self): method forward (line 95) | def forward(self, layer_outputs_source, layer_outputs_target): class AttentionBehavioralRegularization (line 102) | class AttentionBehavioralRegularization(nn.Module): method __init__ (line 129) | def __init__(self, channel_attention): method forward (line 133) | def forward(self, layer_outputs_source, layer_outputs_target): function get_attribute (line 147) | def get_attribute(obj, attr, *args): class IntermediateLayerGetter (line 153) | class IntermediateLayerGetter: method __init__ (line 167) | def __init__(self, model, return_layers, keep_output=True): method __call__ (line 172) | def __call__(self, *args, **kwargs): FILE: tllib/regularization/knowledge_distillation.py class KnowledgeDistillationLoss (line 5) | class KnowledgeDistillationLoss(nn.Module): method __init__ (line 24) | def __init__(self, T=1., reduction='batchmean'): method forward (line 29) | def forward(self, y_student, y_teacher): FILE: tllib/regularization/lwf.py function collect_pretrain_labels (line 11) | def collect_pretrain_labels(data_loader, classifier, device): class Classifier (line 23) | class Classifier(nn.Module): method __init__ (line 48) | def __init__(self, backbone: nn.Module, num_classes: int, head_source, method features_dim (line 77) | def features_dim(self) -> int: method forward (line 81) | def forward(self, x: torch.Tensor): method get_parameters (line 92) | def get_parameters(self, base_lr=1.0) -> List[Dict]: FILE: tllib/reweight/groupdro.py class AutomaticUpdateDomainWeightModule (line 9) | class AutomaticUpdateDomainWeightModule(object): method __init__ (line 34) | def __init__(self, num_domains: int, eta: float, device): method get_domain_weight (line 38) | def get_domain_weight(self, sampled_domain_idxes): method update (line 52) | def update(self, sampled_domain_losses: torch.Tensor, sampled_domain_i... FILE: tllib/reweight/iwan.py class ImportanceWeightModule (line 12) | class ImportanceWeightModule(object): method __init__ (line 36) | def __init__(self, discriminator: nn.Module, partial_classes_index: Op... method get_importance_weight (line 40) | def get_importance_weight(self, feature): method get_partial_classes_weight (line 55) | def get_partial_classes_weight(self, weights: torch.Tensor, labels: to... class ImageClassifier (line 84) | class ImageClassifier(ClassifierBase): method __init__ (line 88) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/reweight/pada.py class AutomaticUpdateClassWeightModule (line 13) | class AutomaticUpdateClassWeightModule(object): method __init__ (line 41) | def __init__(self, update_steps: int, data_loader: DataLoader, method step (line 56) | def step(self): method get_class_weight_for_cross_entropy_loss (line 62) | def get_class_weight_for_cross_entropy_loss(self): method get_class_weight_for_adversarial_loss (line 70) | def get_class_weight_for_adversarial_loss(self, source_labels: torch.T... method get_partial_classes_weight (line 84) | def get_partial_classes_weight(self): class ClassWeightModule (line 98) | class ClassWeightModule(nn.Module): method __init__ (line 124) | def __init__(self, temperature: Optional[float] = 0.1): method forward (line 128) | def forward(self, outputs: torch.Tensor): function collect_classification_results (line 137) | def collect_classification_results(data_loader: DataLoader, classifier: ... FILE: tllib/self_training/cc_loss.py class CCConsistency (line 17) | class CCConsistency(nn.Module): method __init__ (line 46) | def __init__(self, temperature: float, thr=0.7): method forward (line 51) | def forward(self, logits: torch.Tensor, logits_strong: torch.Tensor) -... FILE: tllib/self_training/dst.py class ImageClassifier (line 13) | class ImageClassifier(Classifier): method __init__ (line 41) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... method forward (line 65) | def forward(self, x: torch.Tensor): method get_parameters (line 77) | def get_parameters(self, base_lr=1.0): method step (line 91) | def step(self): function shift_log (line 95) | def shift_log(x, offset=1e-6): class WorstCaseEstimationLoss (line 103) | class WorstCaseEstimationLoss(nn.Module): method __init__ (line 134) | def __init__(self, eta_prime): method forward (line 138) | def forward(self, y_l, y_l_adv, y_u, y_u_adv): FILE: tllib/self_training/flexmatch.py class DynamicThresholdingModule (line 10) | class DynamicThresholdingModule(object): method __init__ (line 41) | def __init__(self, threshold, warmup, mapping_func, num_classes, n_unl... method get_threshold (line 51) | def get_threshold(self, pseudo_labels): method update (line 71) | def update(self, idxes, selected_mask, pseudo_labels): FILE: tllib/self_training/mcc.py class MinimumClassConfusionLoss (line 17) | class MinimumClassConfusionLoss(nn.Module): method __init__ (line 61) | def __init__(self, temperature: float): method forward (line 65) | def forward(self, logits: torch.Tensor) -> torch.Tensor: class ImageClassifier (line 77) | class ImageClassifier(ClassifierBase): method __init__ (line 78) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/self_training/mean_teacher.py function set_requires_grad (line 6) | def set_requires_grad(net, requires_grad=False): class EMATeacher (line 14) | class EMATeacher(object): method __init__ (line 47) | def __init__(self, model, alpha): method set_alpha (line 53) | def set_alpha(self, alpha: float): method update (line 57) | def update(self): method __call__ (line 61) | def __call__(self, x: torch.Tensor): method train (line 64) | def train(self, mode: Optional[bool] = True): method eval (line 67) | def eval(self): method state_dict (line 70) | def state_dict(self): method load_state_dict (line 73) | def load_state_dict(self, state_dict): method module (line 77) | def module(self): function update_bn (line 81) | def update_bn(model, ema_model): FILE: tllib/self_training/pi_model.py function sigmoid_warm_up (line 11) | def sigmoid_warm_up(current_epoch, warm_up_epochs: int): class ConsistencyLoss (line 24) | class ConsistencyLoss(nn.Module): method __init__ (line 49) | def __init__(self, distance_measure: Callable, reduction: Optional[str... method forward (line 54) | def forward(self, p1: torch.Tensor, p2: torch.Tensor, mask=1.): class L2ConsistencyLoss (line 65) | class L2ConsistencyLoss(ConsistencyLoss): method __init__ (line 75) | def __init__(self, reduction: Optional[str] = 'mean'): FILE: tllib/self_training/pseudo_label.py class ConfidenceBasedSelfTrainingLoss (line 10) | class ConfidenceBasedSelfTrainingLoss(nn.Module): method __init__ (line 36) | def __init__(self, threshold: float): method forward (line 40) | def forward(self, y, y_target): FILE: tllib/self_training/self_ensemble.py class ClassBalanceLoss (line 13) | class ClassBalanceLoss(nn.Module): method __init__ (line 38) | def __init__(self, num_classes): method forward (line 42) | def forward(self, p: torch.Tensor): class ImageClassifier (line 46) | class ImageClassifier(ClassifierBase): method __init__ (line 47) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck_d... FILE: tllib/self_training/self_tuning.py class Classifier (line 12) | class Classifier(ClassifierBase): method __init__ (line 38) | def __init__(self, backbone: nn.Module, num_classes: int, projection_d... method forward (line 54) | def forward(self, x: torch.Tensor): method get_parameters (line 67) | def get_parameters(self, base_lr=1.0): class SelfTuning (line 78) | class SelfTuning(nn.Module): method __init__ (line 108) | def __init__(self, encoder_q, encoder_k, num_classes, K=32, m=0.999, T... method _momentum_update_key_encoder (line 130) | def _momentum_update_key_encoder(self): method _dequeue_and_enqueue (line 138) | def _dequeue_and_enqueue(self, h, label): method forward (line 150) | def forward(self, im_q, im_k, labels): FILE: tllib/self_training/uda.py class StrongWeakConsistencyLoss (line 10) | class StrongWeakConsistencyLoss(nn.Module): method __init__ (line 29) | def __init__(self, threshold: float, temperature: float): method forward (line 34) | def forward(self, y_strong, y): FILE: tllib/translation/cycada.py class SemanticConsistency (line 9) | class SemanticConsistency(nn.Module): method __init__ (line 49) | def __init__(self, ignore_index=(), reduction='mean'): method forward (line 54) | def forward(self, input: Tensor, target: Tensor) -> Tensor: FILE: tllib/translation/cyclegan/discriminator.py class NLayerDiscriminator (line 12) | class NLayerDiscriminator(nn.Module): method __init__ (line 22) | def __init__(self, input_nc, ndf=64, n_layers=3, norm_layer=nn.BatchNo... method forward (line 54) | def forward(self, input): class PixelDiscriminator (line 58) | class PixelDiscriminator(nn.Module): method __init__ (line 67) | def __init__(self, input_nc, ndf=64, norm_layer=nn.BatchNorm2d): method forward (line 84) | def forward(self, input): function patch (line 88) | def patch(ndf, input_nc=3, norm='batch', n_layers=3, init_type='normal',... function pixel (line 111) | def pixel(ndf, input_nc=3, norm='batch', init_type='normal', init_gain=0... FILE: tllib/translation/cyclegan/generator.py class ResnetBlock (line 12) | class ResnetBlock(nn.Module): method __init__ (line 15) | def __init__(self, dim, padding_type, norm_layer, use_dropout, use_bias): method build_conv_block (line 26) | def build_conv_block(self, dim, padding_type, norm_layer, use_dropout,... method forward (line 66) | def forward(self, x): class ResnetGenerator (line 72) | class ResnetGenerator(nn.Module): method __init__ (line 79) | def __init__(self, input_nc, output_nc, ngf=64, norm_layer=nn.BatchNor... method forward (line 129) | def forward(self, input): class UnetGenerator (line 134) | class UnetGenerator(nn.Module): method __init__ (line 137) | def __init__(self, input_nc, output_nc, num_downs, ngf=64, norm_layer=... method forward (line 161) | def forward(self, input): class UnetSkipConnectionBlock (line 166) | class UnetSkipConnectionBlock(nn.Module): method __init__ (line 172) | def __init__(self, outer_nc, inner_nc, input_nc=None, method forward (line 229) | def forward(self, x): function resnet_9 (line 236) | def resnet_9(ngf, input_nc=3, output_nc=3, norm='batch', use_dropout=False, function resnet_6 (line 257) | def resnet_6(ngf, input_nc=3, output_nc=3, norm='batch', use_dropout=False, function unet_256 (line 278) | def unet_256(ngf, input_nc=3, output_nc=3, norm='batch', use_dropout=False, function unet_128 (line 301) | def unet_128(ngf, input_nc=3, output_nc=3, norm='batch', use_dropout=False, function unet_32 (line 324) | def unet_32(ngf, input_nc=3, output_nc=3, norm='batch', use_dropout=False, FILE: tllib/translation/cyclegan/loss.py class LeastSquaresGenerativeAdversarialLoss (line 10) | class LeastSquaresGenerativeAdversarialLoss(nn.Module): method __init__ (line 28) | def __init__(self, reduction='mean'): method forward (line 32) | def forward(self, prediction, real=True): class VanillaGenerativeAdversarialLoss (line 40) | class VanillaGenerativeAdversarialLoss(nn.Module): method __init__ (line 58) | def __init__(self, reduction='mean'): method forward (line 62) | def forward(self, prediction, real=True): class WassersteinGenerativeAdversarialLoss (line 70) | class WassersteinGenerativeAdversarialLoss(nn.Module): method __init__ (line 88) | def __init__(self, reduction='mean'): method forward (line 92) | def forward(self, prediction, real=True): FILE: tllib/translation/cyclegan/transform.py class Translation (line 12) | class Translation(nn.Module): method __init__ (line 28) | def __init__(self, generator, device=torch.device("cpu"), mean=(0.5, 0... method forward (line 41) | def forward(self, image): FILE: tllib/translation/cyclegan/util.py class Identity (line 12) | class Identity(nn.Module): method forward (line 13) | def forward(self, x): function get_norm_layer (line 17) | def get_norm_layer(norm_type='instance'): function init_weights (line 37) | def init_weights(net, init_type='normal', init_gain=0.02): class ImagePool (line 72) | class ImagePool: method __init__ (line 83) | def __init__(self, pool_size): method query (line 89) | def query(self, images): function set_requires_grad (line 123) | def set_requires_grad(net, requires_grad=False): FILE: tllib/translation/fourier_transform.py function low_freq_mutate (line 14) | def low_freq_mutate(amp_src: np.ndarray, amp_trg: np.ndarray, beta: Opti... class FourierTransform (line 47) | class FourierTransform(nn.Module): method __init__ (line 116) | def __init__(self, image_list: Sequence[str], amplitude_dir: str, method build_amplitude (line 127) | def build_amplitude(image_list, amplitude_dir): method forward (line 137) | def forward(self, image): FILE: tllib/translation/spgan/loss.py class ContrastiveLoss (line 10) | class ContrastiveLoss(torch.nn.Module): method __init__ (line 33) | def __init__(self, margin=2.0): method forward (line 37) | def forward(self, output1, output2, label): FILE: tllib/translation/spgan/siamese.py class ConvBlock (line 10) | class ConvBlock(nn.Module): method __init__ (line 12) | def __init__(self, in_dim, out_dim): method forward (line 20) | def forward(self, x): class SiameseNetwork (line 24) | class SiameseNetwork(nn.Module): method __init__ (line 30) | def __init__(self, nsf=64): method forward (line 45) | def forward(self, x): FILE: tllib/utils/analysis/__init__.py function collect_feature (line 7) | def collect_feature(data_loader: DataLoader, feature_extractor: nn.Module, FILE: tllib/utils/analysis/a_distance.py class ANet (line 15) | class ANet(nn.Module): method __init__ (line 16) | def __init__(self, in_feature): method forward (line 21) | def forward(self, x): function calculate (line 27) | def calculate(source_feature: torch.Tensor, target_feature: torch.Tensor, FILE: tllib/utils/analysis/tsne.py function visualize (line 15) | def visualize(source_feature: torch.Tensor, target_feature: torch.Tensor, FILE: tllib/utils/data.py function send_to_device (line 18) | def send_to_device(tensor, device): class ForeverDataIterator (line 40) | class ForeverDataIterator: method __init__ (line 43) | def __init__(self, data_loader: DataLoader, device=None): method __next__ (line 48) | def __next__(self): method __len__ (line 60) | def __len__(self): class RandomMultipleGallerySampler (line 64) | class RandomMultipleGallerySampler(Sampler): method __init__ (line 76) | def __init__(self, dataset, num_instances=4): method __len__ (line 97) | def __len__(self): method __iter__ (line 100) | def __iter__(self): class CombineDataset (line 141) | class CombineDataset(Dataset[T_co]): method __init__ (line 151) | def __init__(self, datasets: Iterable[Dataset]) -> None: method __len__ (line 157) | def __len__(self): method __getitem__ (line 160) | def __getitem__(self, idx): function concatenate (line 164) | def concatenate(tensors): FILE: tllib/utils/logger.py class TextLogger (line 9) | class TextLogger(object): method __init__ (line 16) | def __init__(self, filename, stream=sys.stdout): method write (line 20) | def write(self, message): method flush (line 25) | def flush(self): method close (line 29) | def close(self): class CompleteLogger (line 34) | class CompleteLogger: method __init__ (line 47) | def __init__(self, root, phase='train'): method set_epoch (line 69) | def set_epoch(self, epoch): method _get_phase_or_epoch (line 74) | def _get_phase_or_epoch(self): method get_image_path (line 80) | def get_image_path(self, filename: str): method get_checkpoint_path (line 86) | def get_checkpoint_path(self, name=None): method close (line 101) | def close(self): FILE: tllib/utils/meter.py class AverageMeter (line 8) | class AverageMeter(object): method __init__ (line 18) | def __init__(self, name: str, fmt: Optional[str] = ':f'): method reset (line 23) | def reset(self): method update (line 29) | def update(self, val, n=1): method __str__ (line 36) | def __str__(self): class AverageMeterDict (line 41) | class AverageMeterDict(object): method __init__ (line 42) | def __init__(self, names: List, fmt: Optional[str] = ':f'): method reset (line 47) | def reset(self): method update (line 51) | def update(self, accuracies, n=1): method average (line 55) | def average(self): method __getitem__ (line 60) | def __getitem__(self, item): class Meter (line 64) | class Meter(object): method __init__ (line 66) | def __init__(self, name: str, fmt: Optional[str] = ':f'): method reset (line 71) | def reset(self): method update (line 74) | def update(self, val): method __str__ (line 77) | def __str__(self): class ProgressMeter (line 82) | class ProgressMeter(object): method __init__ (line 83) | def __init__(self, num_batches, meters, prefix=""): method display (line 88) | def display(self, batch): method _get_batch_fmtstr (line 93) | def _get_batch_fmtstr(self, num_batches): FILE: tllib/utils/metric/__init__.py function binary_accuracy (line 6) | def binary_accuracy(output: torch.Tensor, target: torch.Tensor) -> float: function accuracy (line 16) | def accuracy(output, target, topk=(1,)): class ConfusionMatrix (line 43) | class ConfusionMatrix(object): method __init__ (line 44) | def __init__(self, num_classes): method update (line 48) | def update(self, target, output): method reset (line 68) | def reset(self): method compute (line 71) | def compute(self): method __str__ (line 87) | def __str__(self): method format (line 99) | def format(self, classes: list): FILE: tllib/utils/metric/keypoint_detection.py function get_max_preds (line 9) | def get_max_preds(batch_heatmaps): function calc_dists (line 40) | def calc_dists(preds, target, normalize): function dist_acc (line 55) | def dist_acc(dists, thr=0.5): function accuracy (line 65) | def accuracy(output, target, hm_type='gaussian', thr=0.5): FILE: tllib/utils/metric/reid.py function unique_sample (line 18) | def unique_sample(ids_dict, num): function cmc (line 27) | def cmc(dist_mat, query_ids, gallery_ids, query_cams, gallery_cams, topk... function mean_ap (line 79) | def mean_ap(dist_mat, query_ids, gallery_ids, query_cams, gallery_cams): function re_ranking (line 105) | def re_ranking(q_g_dist, q_q_dist, g_g_dist, k1=20, k2=6, lambda_value=0... function extract_reid_feature (line 178) | def extract_reid_feature(data_loader, model, device, normalize, print_fr... function pairwise_distance (line 214) | def pairwise_distance(feature_dict, query, gallery): function evaluate_all (line 233) | def evaluate_all(dist_mat, query, gallery, cmc_topk=(1, 5, 10), cmc_flag... function validate (line 259) | def validate(val_loader, model, query, gallery, device, criterion='cosin... function visualize_ranked_results (line 286) | def visualize_ranked_results(data_loader, model, query, gallery, device,... FILE: tllib/utils/scheduler.py class WarmupMultiStepLR (line 10) | class WarmupMultiStepLR(torch.optim.lr_scheduler._LRScheduler): method __init__ (line 27) | def __init__( method get_lr (line 55) | def get_lr(self): FILE: tllib/vision/datasets/_util.py function download (line 10) | def download(root: str, file_name: str, archive_name: str, url_link: str): function check_exits (line 37) | def check_exits(root: str, file_name: str): function read_list_from_file (line 44) | def read_list_from_file(file_name: str) -> List[str]: FILE: tllib/vision/datasets/aircrafts.py class Aircraft (line 11) | class Aircraft(ImageList): method __init__ (line 66) | def __init__(self, root: str, split: str, sample_rate: Optional[int] =... FILE: tllib/vision/datasets/caltech101.py class Caltech101 (line 10) | class Caltech101(ImageList): method __init__ (line 31) | def __init__(self, root, split='train', download=True, **kwargs): FILE: tllib/vision/datasets/cifar.py class CIFAR10 (line 8) | class CIFAR10(CIFAR10Base): method __init__ (line 13) | def __init__(self, root, split='train', transform=None, download=True): class CIFAR100 (line 18) | class CIFAR100(CIFAR100Base): method __init__ (line 23) | def __init__(self, root, split='train', transform=None, download=True): FILE: tllib/vision/datasets/coco70.py class COCO70 (line 11) | class COCO70(ImageList): method __init__ (line 61) | def __init__(self, root: str, split: str, sample_rate: Optional[int] =... FILE: tllib/vision/datasets/cub200.py class CUB200 (line 11) | class CUB200(ImageList): method __init__ (line 103) | def __init__(self, root: str, split: str, sample_rate: Optional[int] =... FILE: tllib/vision/datasets/digits.py class MNIST (line 11) | class MNIST(ImageList): method __init__ (line 38) | def __init__(self, root, mode="L", split='train', download: Optional[b... method __getitem__ (line 51) | def __getitem__(self, index: int) -> Tuple[Any, int]: method get_classes (line 67) | def get_classes(self): class USPS (line 71) | class USPS(ImageList): method __init__ (line 101) | def __init__(self, root, mode="L", split='train', download: Optional[b... method __getitem__ (line 114) | def __getitem__(self, index: int) -> Tuple[Any, int]: class SVHN (line 130) | class SVHN(ImageList): method __init__ (line 162) | def __init__(self, root, mode="L", download: Optional[bool] = True, **... method __getitem__ (line 174) | def __getitem__(self, index: int) -> Tuple[Any, int]: class MNISTRGB (line 190) | class MNISTRGB(MNIST): method __init__ (line 191) | def __init__(self, root, **kwargs): class USPSRGB (line 195) | class USPSRGB(USPS): method __init__ (line 196) | def __init__(self, root, **kwargs): class SVHNRGB (line 200) | class SVHNRGB(SVHN): method __init__ (line 201) | def __init__(self, root, **kwargs): FILE: tllib/vision/datasets/domainnet.py class DomainNet (line 11) | class DomainNet(ImageList): method __init__ (line 95) | def __init__(self, root: str, task: str, split: Optional[str] = 'train... method domains (line 109) | def domains(cls): FILE: tllib/vision/datasets/dtd.py class DTD (line 10) | class DTD(ImageList): method __init__ (line 41) | def __init__(self, root, split, download=False, **kwargs): FILE: tllib/vision/datasets/eurosat.py class EuroSAT (line 10) | class EuroSAT(ImageList): method __init__ (line 30) | def __init__(self, root, split='train', download=False, **kwargs): FILE: tllib/vision/datasets/food101.py class Food101 (line 10) | class Food101(ImageFolder): method __init__ (line 32) | def __init__(self, root, split='train', transform=None, download=True): FILE: tllib/vision/datasets/imagelist.py class ImageList (line 15) | class ImageList(datasets.VisionDataset): method __init__ (line 37) | def __init__(self, root: str, classes: List[str], data_list_file: str, method __getitem__ (line 48) | def __getitem__(self, index: int) -> Tuple[Any, int]: method __len__ (line 62) | def __len__(self) -> int: method parse_data_file (line 65) | def parse_data_file(self, file_name: str) -> List[Tuple[str, int]]: method num_classes (line 85) | def num_classes(self) -> int: method domains (line 90) | def domains(cls): class MultipleDomainsDataset (line 95) | class MultipleDomainsDataset(Dataset[T_co]): method cumsum (line 107) | def cumsum(sequence): method __init__ (line 115) | def __init__(self, domains: Iterable[Dataset], domain_names: Iterable[... method __len__ (line 126) | def __len__(self): method __getitem__ (line 129) | def __getitem__(self, idx): method cummulative_sizes (line 142) | def cummulative_sizes(self): FILE: tllib/vision/datasets/imagenet_r.py class ImageNetR (line 11) | class ImageNetR(ImageList): method __init__ (line 68) | def __init__(self, root: str, task: str, split: Optional[str] = 'all',... method domains (line 84) | def domains(cls): FILE: tllib/vision/datasets/imagenet_sketch.py class ImageNetSketch (line 12) | class ImageNetSketch(ImageList): method __init__ (line 52) | def __init__(self, root: str, task: str, split: Optional[str] = 'all',... method domains (line 68) | def domains(cls): FILE: tllib/vision/datasets/keypoint_detection/freihand.py function _assert_exist (line 18) | def _assert_exist(p): function json_load (line 23) | def json_load(p): function load_db_annotation (line 30) | def load_db_annotation(base_path, set_name=None): function projectPoints (line 56) | def projectPoints(xyz, K): function db_size (line 65) | def db_size(set_name): class sample_version (line 75) | class sample_version: method valid_options (line 84) | def valid_options(cls): method check_valid (line 89) | def check_valid(cls, version): method map_id (line 94) | def map_id(cls, id, version): class FreiHand (line 99) | class FreiHand(Hand21KeypointDataset): method __init__ (line 123) | def __init__(self, root, split='train', task='all', download=True, **k... method __getitem__ (line 150) | def __getitem__(self, index): method get_samples (line 201) | def get_samples(self, root, version='gs'): FILE: tllib/vision/datasets/keypoint_detection/hand_3d_studio.py class Hand3DStudio (line 19) | class Hand3DStudio(Hand21KeypointDataset): method __init__ (line 49) | def __init__(self, root, split='train', task='noobject', download=True... method __getitem__ (line 82) | def __getitem__(self, index): class Hand3DStudioAll (line 119) | class Hand3DStudioAll(Hand3DStudio): method __init__ (line 124) | def __init__(self, root, task='all', **kwargs): FILE: tllib/vision/datasets/keypoint_detection/human36m.py class Human36M (line 17) | class Human36M(Body16KeypointDataset): method __init__ (line 50) | def __init__(self, root, split='train', task='all', download=True, **k... method __getitem__ (line 75) | def __getitem__(self, index): method preprocess (line 111) | def preprocess(self, part, root): FILE: tllib/vision/datasets/keypoint_detection/keypoint_dataset.py class KeypointDataset (line 12) | class KeypointDataset(Dataset, ABC): method __init__ (line 27) | def __init__(self, root, num_keypoints, samples, transforms=None, imag... method __len__ (line 39) | def __len__(self): method visualize (line 42) | def visualize(self, image, keypoints, filename): method group_accuracy (line 62) | def group_accuracy(self, accuracies): class Body16KeypointDataset (line 78) | class Body16KeypointDataset(KeypointDataset, ABC): method __init__ (line 97) | def __init__(self, root, samples, **kwargs): class Hand21KeypointDataset (line 119) | class Hand21KeypointDataset(KeypointDataset, ABC): method __init__ (line 135) | def __init__(self, root, samples, **kwargs): FILE: tllib/vision/datasets/keypoint_detection/lsp.py class LSP (line 19) | class LSP(Body16KeypointDataset): method __init__ (line 42) | def __init__(self, root, split='train', task='all', download=True, ima... method __getitem__ (line 69) | def __getitem__(self, index): FILE: tllib/vision/datasets/keypoint_detection/rendered_hand_pose.py class RenderedHandPose (line 15) | class RenderedHandPose(Hand21KeypointDataset): method __init__ (line 36) | def __init__(self, root, split='train', task='all', download=True, **k... method __getitem__ (line 54) | def __getitem__(self, index): method get_samples (line 106) | def get_samples(self, root, task, min_size=64): FILE: tllib/vision/datasets/keypoint_detection/surreal.py class SURREAL (line 17) | class SURREAL(Body16KeypointDataset): method __init__ (line 43) | def __init__(self, root, split='train', task='all', download=True, **k... method __getitem__ (line 82) | def __getitem__(self, index): method __len__ (line 120) | def __len__(self): FILE: tllib/vision/datasets/keypoint_detection/util.py function generate_target (line 9) | def generate_target(joints, joints_vis, heatmap_size, sigma, image_size): function keypoint2d_to_3d (line 71) | def keypoint2d_to_3d(keypoint2d: np.ndarray, intrinsic_matrix: np.ndarra... function keypoint3d_to_2d (line 78) | def keypoint3d_to_2d(keypoint3d: np.ndarray, intrinsic_matrix: np.ndarray): function scale_box (line 85) | def scale_box(box, image_width, image_height, scale): function get_bounding_box (line 114) | def get_bounding_box(keypoint2d: np.array): function visualize_heatmap (line 123) | def visualize_heatmap(image, heatmaps, filename): function area (line 135) | def area(left, upper, right, lower): function intersection (line 139) | def intersection(box_a, box_b): FILE: tllib/vision/datasets/object_detection/__init__.py function parse_root_and_file_name (line 18) | def parse_root_and_file_name(path): class VOCBase (line 27) | class VOCBase: method __init__ (line 34) | def __init__(self, root, split="trainval", year=2007, ext='.jpg', down... class VOC2007 (line 45) | class VOC2007(VOCBase): method __init__ (line 49) | def __init__(self, root): class VOC2012 (line 53) | class VOC2012(VOCBase): method __init__ (line 57) | def __init__(self, root): class VOC2007Test (line 61) | class VOC2007Test(VOCBase): method __init__ (line 65) | def __init__(self, root): class Clipart (line 69) | class Clipart(VOCBase): class VOCPartialBase (line 74) | class VOCPartialBase: method __init__ (line 79) | def __init__(self, root, split="trainval", year=2007, ext='.jpg', down... class VOC2007Partial (line 90) | class VOC2007Partial(VOCPartialBase): method __init__ (line 94) | def __init__(self, root): class VOC2012Partial (line 98) | class VOC2012Partial(VOCPartialBase): method __init__ (line 102) | def __init__(self, root): class VOC2007PartialTest (line 106) | class VOC2007PartialTest(VOCPartialBase): method __init__ (line 110) | def __init__(self, root): class WaterColor (line 114) | class WaterColor(VOCPartialBase): method __init__ (line 118) | def __init__(self, root): class WaterColorTest (line 122) | class WaterColorTest(VOCPartialBase): method __init__ (line 126) | def __init__(self, root): class Comic (line 130) | class Comic(VOCPartialBase): method __init__ (line 134) | def __init__(self, root): class ComicTest (line 138) | class ComicTest(VOCPartialBase): method __init__ (line 142) | def __init__(self, root): class CityscapesBase (line 146) | class CityscapesBase: method __init__ (line 151) | def __init__(self, root, split="trainval", year=2007, ext='.png'): class Cityscapes (line 160) | class Cityscapes(CityscapesBase): method __init__ (line 161) | def __init__(self, root): class CityscapesTest (line 165) | class CityscapesTest(CityscapesBase): method __init__ (line 166) | def __init__(self, root): class FoggyCityscapes (line 170) | class FoggyCityscapes(Cityscapes): class FoggyCityscapesTest (line 174) | class FoggyCityscapesTest(CityscapesTest): class CityscapesCarBase (line 178) | class CityscapesCarBase: method __init__ (line 183) | def __init__(self, root, split="trainval", year=2007, ext='.png', bbox... class CityscapesCar (line 192) | class CityscapesCar(CityscapesCarBase): class CityscapesCarTest (line 196) | class CityscapesCarTest(CityscapesCarBase): method __init__ (line 197) | def __init__(self, root): class Sim10kCar (line 201) | class Sim10kCar(CityscapesCarBase): method __init__ (line 202) | def __init__(self, root): class KITTICar (line 206) | class KITTICar(CityscapesCarBase): method __init__ (line 207) | def __init__(self, root): class GTA5 (line 211) | class GTA5(CityscapesBase): method __init__ (line 212) | def __init__(self, root): function load_voc_instances (line 216) | def load_voc_instances(dirname: str, split: str, class_names, ext='.jpg'... function register_pascal_voc (line 275) | def register_pascal_voc(name, dirname, split, year, class_names, **kwargs): FILE: tllib/vision/datasets/office31.py class Office31 (line 11) | class Office31(ImageList): method __init__ (line 54) | def __init__(self, root: str, task: str, download: Optional[bool] = Tr... method domains (line 66) | def domains(cls): FILE: tllib/vision/datasets/officecaltech.py class OfficeCaltech (line 12) | class OfficeCaltech(DatasetFolder): method __init__ (line 50) | def __init__(self, root: str, task: str, download: Optional[bool] = Fa... method num_classes (line 70) | def num_classes(self): method domains (line 75) | def domains(cls): FILE: tllib/vision/datasets/officehome.py class OfficeHome (line 11) | class OfficeHome(ImageList): method __init__ (line 59) | def __init__(self, root: str, task: str, download: Optional[bool] = Fa... method domains (line 71) | def domains(cls): FILE: tllib/vision/datasets/openset/__init__.py function open_set (line 17) | def open_set(dataset_class: ClassVar, public_classes: Sequence[str], function default_open_set (line 67) | def default_open_set(dataset_class: ClassVar, source: bool) -> ClassVar: FILE: tllib/vision/datasets/oxfordflowers.py class OxfordFlowers102 (line 10) | class OxfordFlowers102(ImageList): method __init__ (line 54) | def __init__(self, root, split='train', download=False, **kwargs): FILE: tllib/vision/datasets/oxfordpets.py class OxfordIIITPets (line 11) | class OxfordIIITPets(ImageList): method __init__ (line 58) | def __init__(self, root: str, split: str, sample_rate: Optional[int] =... FILE: tllib/vision/datasets/pacs.py class PACS (line 7) | class PACS(ImageList): method __init__ (line 50) | def __init__(self, root: str, task: str, split='all', download: Option... method domains (line 66) | def domains(cls): FILE: tllib/vision/datasets/partial/__init__.py function partial (line 19) | def partial(dataset_class: ClassVar, partial_classes: Sequence[str]) -> ... function default_partial (line 59) | def default_partial(dataset_class: ClassVar) -> ClassVar: FILE: tllib/vision/datasets/partial/caltech_imagenet.py class CaltechImageNet (line 48) | class CaltechImageNet(ImageList): method __init__ (line 87) | def __init__(self, root: str, task: str, download: Optional[bool] = Tr... class CaltechImageNetUniversal (line 104) | class CaltechImageNetUniversal(ImageList): method __init__ (line 143) | def __init__(self, root: str, task: str, download: Optional[bool] = Tr... FILE: tllib/vision/datasets/partial/imagenet_caltech.py class ImageNetCaltech (line 391) | class ImageNetCaltech(ImageList): method __init__ (line 430) | def __init__(self, root: str, task: str, download: Optional[bool] = Tr... class ImageNetCaltechUniversal (line 447) | class ImageNetCaltechUniversal(ImageList): method __init__ (line 487) | def __init__(self, root: str, task: str, download: Optional[bool] = Tr... FILE: tllib/vision/datasets/patchcamelyon.py class PatchCamelyon (line 10) | class PatchCamelyon(ImageList): method __init__ (line 28) | def __init__(self, root, split, download=False, **kwargs): FILE: tllib/vision/datasets/regression/dsprites.py class DSprites (line 11) | class DSprites(ImageRegression): method __init__ (line 53) | def __init__(self, root: str, task: str, split: Optional[str] = 'train', FILE: tllib/vision/datasets/regression/image_regression.py class ImageRegression (line 12) | class ImageRegression(datasets.VisionDataset): method __init__ (line 34) | def __init__(self, root: str, factors: Sequence[str], data_list_file: ... method __getitem__ (line 42) | def __getitem__(self, index: int) -> Tuple[Any, Tuple[float]]: method __len__ (line 58) | def __len__(self) -> int: method parse_data_file (line 61) | def parse_data_file(self, file_name: str) -> List[Tuple[str, Any]]: method num_factors (line 82) | def num_factors(self) -> int: FILE: tllib/vision/datasets/regression/mpi3d.py class MPI3D (line 11) | class MPI3D(ImageRegression): method __init__ (line 53) | def __init__(self, root: str, task: str, split: Optional[str] = 'train', FILE: tllib/vision/datasets/reid/basedataset.py class BaseDataset (line 10) | class BaseDataset(object): method get_imagedata_info (line 15) | def get_imagedata_info(self, data): method get_videodata_info (line 27) | def get_videodata_info(self, data, return_tracklet_stats=False): method print_dataset_statistics (line 42) | def print_dataset_statistics(self, train, query, galler): method check_before_run (line 45) | def check_before_run(self, required_files): method images_dir (line 58) | def images_dir(self): class BaseImageDataset (line 62) | class BaseImageDataset(BaseDataset): method print_dataset_statistics (line 67) | def print_dataset_statistics(self, train, query, gallery): class BaseVideoDataset (line 82) | class BaseVideoDataset(BaseDataset): method print_dataset_statistics (line 87) | def print_dataset_statistics(self, train, query, gallery): FILE: tllib/vision/datasets/reid/convert.py function convert_to_pytorch_dataset (line 10) | def convert_to_pytorch_dataset(dataset, root=None, transform=None, retur... FILE: tllib/vision/datasets/reid/dukemtmc.py class DukeMTMC (line 15) | class DukeMTMC(BaseImageDataset): method __init__ (line 32) | def __init__(self, root, verbose=True): method process_dir (line 60) | def process_dir(self, dir_path, relabel=False): method translate (line 81) | def translate(self, transform: Callable, target_root: str): method translate_dir (line 102) | def translate_dir(self, transform, origin_dir: str, target_dir: str): FILE: tllib/vision/datasets/reid/market1501.py class Market1501 (line 15) | class Market1501(BaseImageDataset): method __init__ (line 32) | def __init__(self, root, verbose=True): method process_dir (line 60) | def process_dir(self, dir_path, relabel=False): method translate (line 86) | def translate(self, transform: Callable, target_root: str): method translate_dir (line 107) | def translate_dir(self, transform, origin_dir: str, target_dir: str): FILE: tllib/vision/datasets/reid/msmt17.py class MSMT17 (line 13) | class MSMT17(BaseImageDataset): method __init__ (line 30) | def __init__(self, root, verbose=True): method process_dir (line 53) | def process_dir(self, dir_path): method translate (line 71) | def translate(self, transform: Callable, target_root: str): method translate_dir (line 92) | def translate_dir(self, transform, origin_dir: str, target_dir: str): FILE: tllib/vision/datasets/reid/personx.py class PersonX (line 16) | class PersonX(BaseImageDataset): method __init__ (line 33) | def __init__(self, root, verbose=True): method process_dir (line 61) | def process_dir(self, dir_path, relabel=False): method translate (line 84) | def translate(self, transform: Callable, target_root: str): method translate_dir (line 105) | def translate_dir(self, transform, origin_dir: str, target_dir: str): FILE: tllib/vision/datasets/reid/unreal.py class UnrealPerson (line 12) | class UnrealPerson(BaseImageDataset): method __init__ (line 42) | def __init__(self, root, verbose=True): method process_dir (line 66) | def process_dir(self, list_file): method translate (line 86) | def translate(self, transform: Callable, target_root: str): FILE: tllib/vision/datasets/resisc45.py class Resisc45 (line 10) | class Resisc45(ImageFolder): method __init__ (line 27) | def __init__(self, root, split='train', download=False, **kwargs): method num_classes (line 37) | def num_classes(self) -> int: FILE: tllib/vision/datasets/retinopathy.py class Retinopathy (line 9) | class Retinopathy(ImageList): method __init__ (line 27) | def __init__(self, root, split, download=False, **kwargs): FILE: tllib/vision/datasets/segmentation/cityscapes.py class Cityscapes (line 10) | class Cityscapes(SegmentationList): method __init__ (line 55) | def __init__(self, root, split='train', data_folder='leftImg8bit', lab... method parse_label_file (line 67) | def parse_label_file(self, label_list_file): class FoggyCityscapes (line 73) | class FoggyCityscapes(Cityscapes): method __init__ (line 99) | def __init__(self, root, split='train', data_folder='leftImg8bit_foggy... method parse_data_file (line 104) | def parse_data_file(self, file_name): FILE: tllib/vision/datasets/segmentation/gta5.py class GTA5 (line 11) | class GTA5(SegmentationList): method __init__ (line 33) | def __init__(self, root, split='train', data_folder='images', label_fo... FILE: tllib/vision/datasets/segmentation/segmentation_list.py class SegmentationList (line 14) | class SegmentationList(data.Dataset): method __init__ (line 42) | def __init__(self, root: str, classes: Sequence[str], data_list_file: ... method parse_data_file (line 59) | def parse_data_file(self, file_name): method parse_label_file (line 72) | def parse_label_file(self, file_name): method __len__ (line 85) | def __len__(self): method __getitem__ (line 88) | def __getitem__(self, index): method num_classes (line 107) | def num_classes(self) -> int: method decode_target (line 111) | def decode_target(self, target): method collect_image_paths (line 125) | def collect_image_paths(self): method _save_pil_image (line 130) | def _save_pil_image(image, path): method translate (line 134) | def translate(self, transform: Callable, target_root: str, color=False): method evaluate_classes (line 161) | def evaluate_classes(self): method ignore_classes (line 166) | def ignore_classes(self): FILE: tllib/vision/datasets/segmentation/synthia.py class Synthia (line 11) | class Synthia(SegmentationList): method __init__ (line 38) | def __init__(self, root, split='train', data_folder='RGB', label_folde... method evaluate_classes (line 48) | def evaluate_classes(self): FILE: tllib/vision/datasets/stanford_cars.py class StanfordCars (line 11) | class StanfordCars(ImageList): method __init__ (line 67) | def __init__(self, root: str, split: str, sample_rate: Optional[int] =... FILE: tllib/vision/datasets/stanford_dogs.py class StanfordDogs (line 11) | class StanfordDogs(ImageList): method __init__ (line 95) | def __init__(self, root: str, split: str, sample_rate: Optional[int] =... FILE: tllib/vision/datasets/sun397.py class SUN397 (line 10) | class SUN397(ImageList): method __init__ (line 30) | def __init__(self, root, split='train', download=True, **kwargs): FILE: tllib/vision/datasets/visda2017.py class VisDA2017 (line 11) | class VisDA2017(ImageList): method __init__ (line 47) | def __init__(self, root: str, task: str, download: Optional[bool] = Fa... method domains (line 59) | def domains(cls): FILE: tllib/vision/models/digits.py class LeNet (line 8) | class LeNet(nn.Sequential): method __init__ (line 9) | def __init__(self, num_classes=10): method copy_head (line 26) | def copy_head(self): class DTN (line 30) | class DTN(nn.Sequential): method __init__ (line 31) | def __init__(self, num_classes=10): method copy_head (line 54) | def copy_head(self): function lenet (line 59) | def lenet(pretrained=False, **kwargs): function dtn (line 73) | def dtn(pretrained=False, **kwargs): FILE: tllib/vision/models/keypoint_detection/loss.py class JointsMSELoss (line 10) | class JointsMSELoss(nn.Module): method __init__ (line 33) | def __init__(self, reduction='mean'): method forward (line 38) | def forward(self, output, target, target_weight=None): class JointsKLLoss (line 51) | class JointsKLLoss(nn.Module): method __init__ (line 75) | def __init__(self, reduction='mean', epsilon=0.): method forward (line 81) | def forward(self, output, target, target_weight=None): FILE: tllib/vision/models/keypoint_detection/pose_resnet.py class Upsampling (line 10) | class Upsampling(nn.Sequential): method __init__ (line 14) | def __init__(self, in_channel=2048, hidden_dims=(256, 256, 256), kerne... class PoseResNet (line 58) | class PoseResNet(nn.Module): method __init__ (line 69) | def __init__(self, backbone, upsampling, feature_dim, num_keypoints, f... method forward (line 79) | def forward(self, x): method get_parameters (line 85) | def get_parameters(self, lr=1.): function _pose_resnet (line 93) | def _pose_resnet(arch, num_keypoints, block, layers, pretrained_backbone... function pose_resnet101 (line 100) | def pose_resnet101(num_keypoints, pretrained_backbone=True, deconv_with_... FILE: tllib/vision/models/object_detection/backbone/mmdetection/vgg.py function conv3x3 (line 8) | def conv3x3(in_planes, out_planes, dilation=1): function make_vgg_layer (line 18) | def make_vgg_layer(inplanes, class VGG (line 36) | class VGG(nn.Module): method __init__ (line 59) | def __init__(self, method _freeze_backbone (line 128) | def _freeze_backbone(self, freeze_at): method init_weights (line 140) | def init_weights(self, pretrained=None): method forward (line 154) | def forward(self, x): FILE: tllib/vision/models/object_detection/backbone/mmdetection/weight_init.py function constant_init (line 8) | def constant_init(module, val, bias=0): function xavier_init (line 14) | def xavier_init(module, gain=1, bias=0, distribution='normal'): function normal_init (line 24) | def normal_init(module, mean=0, std=1, bias=0): function uniform_init (line 30) | def uniform_init(module, a=0, b=1, bias=0): function kaiming_init (line 36) | def kaiming_init(module, function caffe2_xavier_init (line 53) | def caffe2_xavier_init(module, bias=0): FILE: tllib/vision/models/object_detection/backbone/vgg.py class FPN (line 9) | class FPN(nn.Module): method __init__ (line 16) | def __init__( method forward (line 45) | def forward(self, x): class LastLevelMaxPool (line 79) | class LastLevelMaxPool(nn.Module): method forward (line 80) | def forward(self, x): class LastLevelP6P7 (line 84) | class LastLevelP6P7(nn.Module): method __init__ (line 88) | def __init__(self, in_channels, out_channels): method forward (line 97) | def forward(self, c5, p5): class _NewEmptyTensorOp (line 104) | class _NewEmptyTensorOp(torch.autograd.Function): method forward (line 106) | def forward(ctx, x, new_shape): method backward (line 111) | def backward(ctx, grad): class Conv2d (line 116) | class Conv2d(torch.nn.Conv2d): method forward (line 117) | def forward(self, x): function conv_with_kaiming_uniform (line 132) | def conv_with_kaiming_uniform(): class VGGFPN (line 157) | class VGGFPN(Backbone): method __init__ (line 158) | def __init__(self, body, fpn): method forward (line 170) | def forward(self, x): function build_vgg_fpn_backbone (line 180) | def build_vgg_fpn_backbone(cfg, input_shape): FILE: tllib/vision/models/object_detection/meta_arch/rcnn.py class TLGeneralizedRCNN (line 12) | class TLGeneralizedRCNN(GeneralizedRCNNBase): method __init__ (line 55) | def __init__(self, *args, finetune=False, **kwargs): method forward (line 59) | def forward(self, batched_inputs: Tuple[Dict[str, torch.Tensor]], labe... method get_parameters (line 91) | def get_parameters(self, lr=1.): FILE: tllib/vision/models/object_detection/meta_arch/retinanet.py class TLRetinaNet (line 13) | class TLRetinaNet(RetinaNetBase): method __init__ (line 82) | def __init__(self, *args, finetune=False, **kwargs): method forward (line 86) | def forward(self, batched_inputs: Tuple[Dict[str, Tensor]], labeled=Tr... method get_parameters (line 118) | def get_parameters(self, lr=1.): FILE: tllib/vision/models/object_detection/proposal_generator/rpn.py class TLRPN (line 16) | class TLRPN(RPN): method __init__ (line 63) | def __init__(self, *args, **kwargs): method forward (line 66) | def forward( FILE: tllib/vision/models/object_detection/roi_heads/roi_heads.py class TLRes5ROIHeads (line 17) | class TLRes5ROIHeads(Res5ROIHeads): method __init__ (line 60) | def __init__(self, *args, **kwargs): method forward (line 63) | def forward(self, images, features, proposals, targets=None, labeled=T... method sample_unlabeled_proposals (line 108) | def sample_unlabeled_proposals( class TLStandardROIHeads (line 127) | class TLStandardROIHeads(StandardROIHeads): method __init__ (line 177) | def __init__(self, *args, **kwargs): method forward (line 180) | def forward(self, images, features, proposals, targets=None, labeled=T... method _forward_box (line 208) | def _forward_box(self, features: Dict[str, torch.Tensor], proposals: L... method sample_unlabeled_proposals (line 250) | def sample_unlabeled_proposals( FILE: tllib/vision/models/reid/identifier.py class ReIdentifier (line 11) | class ReIdentifier(nn.Module): method __init__ (line 20) | def __init__(self, backbone: nn.Module, num_classes: int, bottleneck: ... method features_dim (line 54) | def features_dim(self) -> int: method forward (line 58) | def forward(self, x: torch.Tensor): method get_parameters (line 67) | def get_parameters(self, base_lr=1.0, rate=0.1) -> List[Dict]: FILE: tllib/vision/models/reid/loss.py function pairwise_euclidean_distance (line 11) | def pairwise_euclidean_distance(x, y): function hard_examples_mining (line 22) | def hard_examples_mining(dist_mat, identity_mat, return_idxes=False): class CrossEntropyLossWithLabelSmooth (line 52) | class CrossEntropyLossWithLabelSmooth(nn.Module): method __init__ (line 77) | def __init__(self, num_classes, epsilon=0.1): method forward (line 83) | def forward(self, y, labels): class TripletLoss (line 91) | class TripletLoss(nn.Module): method __init__ (line 101) | def __init__(self, margin, normalize_feature=False): method forward (line 107) | def forward(self, f, labels): class TripletLossXBM (line 122) | class TripletLossXBM(nn.Module): method __init__ (line 145) | def __init__(self, margin=0.3, normalize_feature=False): method forward (line 151) | def forward(self, f, labels, xbm_f, xbm_labels): class SoftTripletLoss (line 171) | class SoftTripletLoss(nn.Module): method __init__ (line 196) | def __init__(self, margin=None, normalize_feature=False): method forward (line 201) | def forward(self, features_1, features_2, labels): class CrossEntropyLoss (line 231) | class CrossEntropyLoss(nn.Module): method __init__ (line 248) | def __init__(self): method forward (line 252) | def forward(self, y, labels): FILE: tllib/vision/models/reid/resnet.py class ReidResNet (line 10) | class ReidResNet(ResNet): method __init__ (line 17) | def __init__(self, *args, **kwargs): method forward (line 22) | def forward(self, x): function _reid_resnet (line 36) | def _reid_resnet(arch, block, layers, pretrained, progress, **kwargs): function reid_resnet18 (line 48) | def reid_resnet18(pretrained=False, progress=True, **kwargs): function reid_resnet34 (line 59) | def reid_resnet34(pretrained=False, progress=True, **kwargs): function reid_resnet50 (line 70) | def reid_resnet50(pretrained=False, progress=True, **kwargs): function reid_resnet101 (line 81) | def reid_resnet101(pretrained=False, progress=True, **kwargs): FILE: tllib/vision/models/resnet.py class ResNet (line 18) | class ResNet(models.ResNet): method __init__ (line 21) | def __init__(self, *args, **kwargs): method forward (line 25) | def forward(self, x): method out_features (line 43) | def out_features(self) -> int: method copy_head (line 47) | def copy_head(self) -> nn.Module: function _resnet (line 52) | def _resnet(arch, block, layers, pretrained, progress, **kwargs): function resnet18 (line 64) | def resnet18(pretrained=False, progress=True, **kwargs): function resnet34 (line 76) | def resnet34(pretrained=False, progress=True, **kwargs): function resnet50 (line 88) | def resnet50(pretrained=False, progress=True, **kwargs): function resnet101 (line 100) | def resnet101(pretrained=False, progress=True, **kwargs): function resnet152 (line 112) | def resnet152(pretrained=False, progress=True, **kwargs): function resnext50_32x4d (line 124) | def resnext50_32x4d(pretrained=False, progress=True, **kwargs): function resnext101_32x8d (line 138) | def resnext101_32x8d(pretrained=False, progress=True, **kwargs): function wide_resnet50_2 (line 152) | def wide_resnet50_2(pretrained=False, progress=True, **kwargs): function wide_resnet101_2 (line 170) | def wide_resnet101_2(pretrained=False, progress=True, **kwargs): FILE: tllib/vision/models/segmentation/deeplabv2.py class Bottleneck (line 16) | class Bottleneck(nn.Module): method __init__ (line 19) | def __init__(self, inplanes, planes, stride=1, dilation=1, downsample=... method forward (line 43) | def forward(self, x): class ASPP_V2 (line 66) | class ASPP_V2(nn.Module): method __init__ (line 67) | def __init__(self, inplanes, dilation_series, padding_series, num_clas... method forward (line 77) | def forward(self, x): class ResNet (line 85) | class ResNet(nn.Module): method __init__ (line 86) | def __init__(self, block, layers): method _make_layer (line 109) | def _make_layer(self, block, planes, blocks, stride=1, dilation=1): method forward (line 125) | def forward(self, x): class Deeplab (line 137) | class Deeplab(nn.Module): method __init__ (line 138) | def __init__(self, backbone, classifier, num_classes): method forward (line 144) | def forward(self, x): method get_1x_lr_params_NOscale (line 149) | def get_1x_lr_params_NOscale(self): method get_10x_lr_params (line 164) | def get_10x_lr_params(self): method get_parameters (line 172) | def get_parameters(self, lr=1.): function deeplabv2_resnet101 (line 179) | def deeplabv2_resnet101(num_classes=19, pretrained_backbone=True): FILE: tllib/vision/transforms/__init__.py class ResizeImage (line 9) | class ResizeImage(object): method __init__ (line 18) | def __init__(self, size): method __call__ (line 24) | def __call__(self, img): method __repr__ (line 28) | def __repr__(self): class MultipleApply (line 32) | class MultipleApply: method __init__ (line 51) | def __init__(self, transforms): method __call__ (line 54) | def __call__(self, image): method __repr__ (line 57) | def __repr__(self): class Denormalize (line 66) | class Denormalize(Normalize): method __init__ (line 82) | def __init__(self, mean, std): class NormalizeAndTranspose (line 88) | class NormalizeAndTranspose: method __init__ (line 94) | def __init__(self, mean=(104.00698793, 116.66876762, 122.67891434)): method __call__ (line 97) | def __call__(self, image): class DeNormalizeAndTranspose (line 116) | class DeNormalizeAndTranspose: method __init__ (line 122) | def __init__(self, mean=(104.00698793, 116.66876762, 122.67891434)): method __call__ (line 125) | def __call__(self, image): class RandomErasing (line 134) | class RandomErasing(object): method __init__ (line 147) | def __init__(self, probability=0.5, sl=0.02, sh=0.4, r1=0.3, mean=(0.4... method __call__ (line 154) | def __call__(self, img): method __repr__ (line 181) | def __repr__(self): FILE: tllib/vision/transforms/keypoint_detection.py function wrapper (line 17) | def wrapper(transform: ClassVar): function resize (line 39) | def resize(image: Image.Image, size: int, interpolation=Image.BILINEAR, function crop (line 55) | def crop(image: Image.Image, top, left, height, width, keypoint2d: np.nd... function resized_crop (line 63) | def resized_crop(img, top, left, height, width, size, interpolation=Imag... function center_crop (line 87) | def center_crop(image, output_size, keypoint2d: np.ndarray): function hflip (line 105) | def hflip(image: Image.Image, keypoint2d: np.ndarray): function rotate (line 113) | def rotate(image: Image.Image, angle, keypoint2d: np.ndarray): function resize_pad (line 131) | def resize_pad(img, keypoint2d, size, interpolation=Image.BILINEAR): class Compose (line 158) | class Compose(object): method __init__ (line 165) | def __init__(self, transforms): method __call__ (line 168) | def __call__(self, image, **kwargs): class GaussianBlur (line 174) | class GaussianBlur(object): method __init__ (line 175) | def __init__(self, low=0, high=0.8): method __call__ (line 179) | def __call__(self, image: Image, **kwargs): class Resize (line 185) | class Resize(object): method __init__ (line 189) | def __init__(self, size, interpolation=Image.BILINEAR): method __call__ (line 194) | def __call__(self, image, keypoint2d: np.ndarray, intrinsic_matrix: np... class ResizePad (line 202) | class ResizePad(object): method __init__ (line 205) | def __init__(self, size, interpolation=Image.BILINEAR): method __call__ (line 209) | def __call__(self, img, keypoint2d, **kwargs): class CenterCrop (line 215) | class CenterCrop(object): method __init__ (line 219) | def __init__(self, size): method __call__ (line 225) | def __call__(self, image, keypoint2d, **kwargs): class RandomRotation (line 240) | class RandomRotation(object): method __init__ (line 249) | def __init__(self, degrees): method get_params (line 261) | def get_params(degrees): method __call__ (line 271) | def __call__(self, image, keypoint2d, **kwargs): class RandomResizedCrop (line 289) | class RandomResizedCrop(object): method __init__ (line 304) | def __init__(self, size, scale=(0.6, 1.3), interpolation=Image.BILINEAR): method get_params (line 313) | def get_params(img, scale): method __call__ (line 342) | def __call__(self, image, keypoint2d: np.ndarray, intrinsic_matrix: np... class RandomApply (line 358) | class RandomApply(T.RandomTransforms): method __init__ (line 366) | def __init__(self, transforms, p=0.5): method __call__ (line 370) | def __call__(self, image, **kwargs): FILE: tllib/vision/transforms/segmentation.py function wrapper (line 17) | def wrapper(transform: ClassVar): class Compose (line 42) | class Compose: method __init__ (line 54) | def __init__(self, transforms): method __call__ (line 58) | def __call__(self, image, target): class Resize (line 64) | class Resize(nn.Module): method __init__ (line 75) | def __init__(self, image_size, label_size=None): method forward (line 83) | def forward(self, image, label): class RandomCrop (line 98) | class RandomCrop(nn.Module): method __init__ (line 105) | def __init__(self, size): method forward (line 109) | def forward(self, image, label): class RandomHorizontalFlip (line 132) | class RandomHorizontalFlip(nn.Module): method __init__ (line 139) | def __init__(self, p=0.5): method forward (line 143) | def forward(self, image, label): class RandomResizedCrop (line 157) | class RandomResizedCrop(T.RandomResizedCrop): method __init__ (line 174) | def __init__(self, size, scale=(0.5, 1.0), ratio=(3. / 4., 4. / 3.), i... method get_params (line 178) | def get_params( method forward (line 222) | def forward(self, image, label): class RandomChoice (line 239) | class RandomChoice(T.RandomTransforms): method __call__ (line 242) | def __call__(self, image, label): class RandomApply (line 247) | class RandomApply(T.RandomTransforms): method __init__ (line 255) | def __init__(self, transforms, p=0.5): method __call__ (line 259) | def __call__(self, image, label):