salad.utils packageΒΆ

SubmodulesΒΆ

salad.utils.augment moduleΒΆ

class salad.utils.augment.AffineTransformer(*args, **kwargs)ΒΆ

Bases: torch.nn.modules.module.Module

affine(y, theta)ΒΆ
invert_affine(M)ΒΆ

Invert matrix for an affine transformation. Supports batch inputs

M : Transformation matrices of shape (… x 6)

Output: Inverse transformation matrices of shape (… x 6)

stn(x, theta)ΒΆ
class salad.utils.augment.RandomAffines(flip_x=0.5, flip_y=0.5, shear_x=(0, 0.3), shear_y=(0, 0.3), scale=(0.8, 1.4), rotate=(-1.5707963267948966, 3.141592653589793), dx=(-0.2, 0.2), dy=(-0.2, 0.2))ΒΆ

Bases: object

compose(size)ΒΆ
identify(size)ΒΆ
matmul(A, B)ΒΆ
reflect(size, p=0.5)ΒΆ
rotated(size, p=0.5)ΒΆ
scaled(size, p=0.5)ΒΆ
shear(size, p=0.5)ΒΆ
shift(size, p=0.5)ΒΆ

salad.utils.base moduleΒΆ

salad.utils.base.load_or_create(init_func, path)ΒΆ
salad.utils.base.panelize(img)ΒΆ

salad.utils.config moduleΒΆ

Experiment Configurations for salad

This file contains classes to easily configure experiments for different solvers available in salad.

class salad.utils.config.BaseConfig(description, log='./log')ΒΆ

Bases: argparse.ArgumentParser

Basic configuration with arguments for most deep learning experiments

print_config()ΒΆ
class salad.utils.config.DomainAdaptConfig(description, log='./log')ΒΆ

Bases: salad.utils.config.BaseConfig

Base Configuration for Unsupervised Domain Adaptation Experiments

salad.utils.evaluate moduleΒΆ

salad.utils.evaluate.evaluate(checkpoints, data_loader, domain)ΒΆ

salad.utils.finetune moduleΒΆ

class salad.utils.finetune.FinetuneSolver(*args, **kwargs)ΒΆ

Bases: salad.solver.classification.BaseClassSolver

class salad.utils.finetune.Loss(model)ΒΆ

Bases: object