SYMBOL INDEX (246 symbols across 36 files) FILE: memcnn/config/__init__.py class Config (line 5) | class Config(dict): method __init__ (line 6) | def __init__(self, dic=None, verbose=False): method get_filename (line 17) | def get_filename(): method get_dir (line 21) | def get_dir(): FILE: memcnn/config/tests/test_config.py class ConfigTestCase (line 9) | class ConfigTestCase(unittest.TestCase): class ConfigTest (line 11) | class ConfigTest(Config): method get_filename (line 13) | def get_filename(): method setUp (line 16) | def setUp(self): method test_loading_main_config (line 29) | def test_loading_main_config(self): method test_loading_experiments_config (line 36) | def test_loading_experiments_config(self): method test_experiment_configs (line 41) | def test_experiment_configs(self): method test_config_get_filename (line 51) | def test_config_get_filename(self): method test_config_get_dir (line 54) | def test_config_get_dir(self): method test_verbose (line 57) | def test_verbose(self): FILE: memcnn/data/cifar.py function random_crop_transform (line 9) | def random_crop_transform(x, crop_size=3, img_size=(32, 32)): function tonumpy_fn (line 16) | def tonumpy_fn(x): function random_lr_flip_fn (line 20) | def random_lr_flip_fn(x): function mean_subtract_fn (line 24) | def mean_subtract_fn(x, mean=0): function reformat_fn (line 28) | def reformat_fn(x): function get_cifar_data_loaders (line 32) | def get_cifar_data_loaders(dataset, data_dir, max_epoch, batch_size, wor... FILE: memcnn/data/sampling.py class NSamplesRandomSampler (line 5) | class NSamplesRandomSampler(Sampler): method nsamples (line 16) | def nsamples(self): method nsamples (line 20) | def nsamples(self, value): method __init__ (line 23) | def __init__(self, data_source, nsamples): method __iter__ (line 27) | def __iter__(self): method __len__ (line 36) | def __len__(self): FILE: memcnn/data/tests/test_cifar.py function test_random_crop_transform (line 9) | def test_random_crop_transform(crop_size, img_size): function test_cifar_data_loaders (line 20) | def test_cifar_data_loaders(max_epoch, batch_size): FILE: memcnn/data/tests/test_sampling.py function test_random_sampler (line 13) | def test_random_sampler(nsamples, data_samples, assign_after_creation): FILE: memcnn/examples/minimal.py class ExampleOperation (line 7) | class ExampleOperation(nn.Module): method __init__ (line 8) | def __init__(self, channels): method forward (line 17) | def forward(self, x): FILE: memcnn/examples/test_examples.py function test_minimal (line 5) | def test_minimal(): FILE: memcnn/experiment/factory.py function get_attr_from_module (line 5) | def get_attr_from_module(pclass): function load_experiment_config (line 11) | def load_experiment_config(experiments_file, experiment_tags): function _inject_items (line 21) | def _inject_items(tempdict, d): function build_dict (line 33) | def build_dict(experiments_dict, experiment_name, classhist=None): function experiment_config_parser (line 47) | def experiment_config_parser(d, data_dir, workers=None): FILE: memcnn/experiment/manager.py class ExperimentManager (line 9) | class ExperimentManager(object): method __init__ (line 10) | def __init__(self, experiment_dir, model=None, optimizer=None): method make_dirs (line 20) | def make_dirs(self): method delete_dirs (line 26) | def delete_dirs(self): method any_dir_exists (line 32) | def any_dir_exists(self): method all_dirs_exists (line 35) | def all_dirs_exists(self): method save_model_state (line 38) | def save_model_state(self, epoch): method load_model_state (line 43) | def load_model_state(self, epoch): method save_optimizer_state (line 48) | def save_optimizer_state(self, epoch): method load_optimizer_state (line 53) | def load_optimizer_state(self, epoch): method save_train_state (line 58) | def save_train_state(self, epoch): method load_train_state (line 62) | def load_train_state(self, epoch): method get_last_model_iteration (line 66) | def get_last_model_iteration(self): method load_last_train_state (line 70) | def load_last_train_state(self): FILE: memcnn/experiment/tests/test_factory.py function test_get_attr_from_module (line 7) | def test_get_attr_from_module(): function test_load_experiment_config (line 12) | def test_load_experiment_config(): function test_experiment_config_parser (line 18) | def test_experiment_config_parser(tmp_path): function test_circular_dependency (line 25) | def test_circular_dependency(tmp_path): FILE: memcnn/experiment/tests/test_manager.py function test_experiment_manager (line 5) | def test_experiment_manager(tmp_path): FILE: memcnn/models/additive.py class AdditiveCoupling (line 8) | class AdditiveCoupling(nn.Module): method __init__ (line 9) | def __init__(self, Fm, Gm=None, implementation_fwd=-1, implementation_... method forward (line 53) | def forward(self, x): method inverse (line 73) | def inverse(self, y): class AdditiveBlock (line 94) | class AdditiveBlock(AdditiveCoupling): method __init__ (line 95) | def __init__(self, Fm, Gm=None, implementation_fwd=1, implementation_b... class AdditiveBlockFunction (line 103) | class AdditiveBlockFunction(torch.autograd.Function): method forward (line 105) | def forward(ctx, xin, Fm, Gm, *weights): method backward (line 161) | def backward(ctx, grad_output): # pragma: no cover class AdditiveBlockInverseFunction (line 192) | class AdditiveBlockInverseFunction(torch.autograd.Function): method forward (line 194) | def forward(cty, y, Fm, Gm, *weights): method backward (line 253) | def backward(cty, grad_output): # pragma: no cover class AdditiveBlockFunction2 (line 284) | class AdditiveBlockFunction2(torch.autograd.Function): method forward (line 286) | def forward(ctx, xin, Fm, Gm, *weights): method backward (line 343) | def backward(ctx, grad_output): # pragma: no cover class AdditiveBlockInverseFunction2 (line 394) | class AdditiveBlockInverseFunction2(torch.autograd.Function): method forward (line 396) | def forward(cty, y, Fm, Gm, *weights): method backward (line 452) | def backward(cty, grad_output): # pragma: no cover FILE: memcnn/models/affine.py class AffineAdapterNaive (line 10) | class AffineAdapterNaive(nn.Module): method __init__ (line 15) | def __init__(self, module): method forward (line 19) | def forward(self, x): class AffineAdapterSigmoid (line 25) | class AffineAdapterSigmoid(nn.Module): method __init__ (line 31) | def __init__(self, module): method forward (line 35) | def forward(self, x): class AffineCoupling (line 43) | class AffineCoupling(nn.Module): method __init__ (line 44) | def __init__(self, Fm, Gm=None, adapter=None, implementation_fwd=-1, i... method forward (line 101) | def forward(self, x): method inverse (line 121) | def inverse(self, y): class AffineBlock (line 142) | class AffineBlock(AffineCoupling): method __init__ (line 143) | def __init__(self, Fm, Gm=None, implementation_fwd=1, implementation_b... class AffineBlockFunction (line 151) | class AffineBlockFunction(torch.autograd.Function): method forward (line 153) | def forward(ctx, xin, Fm, Gm, *weights): method backward (line 216) | def backward(ctx, grad_output): # pragma: no cover class AffineBlockInverseFunction (line 250) | class AffineBlockInverseFunction(torch.autograd.Function): method forward (line 252) | def forward(cty, yin, Fm, Gm, *weights): method backward (line 317) | def backward(cty, grad_output): # pragma: no cover class AffineBlockFunction2 (line 351) | class AffineBlockFunction2(torch.autograd.Function): method forward (line 353) | def forward(ctx, xin, Fm, Gm, *weights): method backward (line 416) | def backward(ctx, grad_output): # pragma: no cover class AffineBlockInverseFunction2 (line 471) | class AffineBlockInverseFunction2(torch.autograd.Function): method forward (line 473) | def forward(cty, yin, Fm, Gm, *weights): method backward (line 528) | def backward(cty, grad_output): # pragma: no cover FILE: memcnn/models/resnet.py function conv3x3 (line 24) | def conv3x3(in_planes, out_planes, stride=1): function batch_norm (line 29) | def batch_norm(x): class BasicBlock (line 34) | class BasicBlock(nn.Module): method __init__ (line 37) | def __init__(self, inplanes, planes, stride=1, downsample=None, noacti... method forward (line 43) | def forward(self, x): class Bottleneck (line 52) | class Bottleneck(nn.Module): method __init__ (line 55) | def __init__(self, inplanes, planes, stride=1, downsample=None, noacti... method forward (line 61) | def forward(self, x): class RevBasicBlock (line 70) | class RevBasicBlock(nn.Module): method __init__ (line 73) | def __init__(self, inplanes, planes, stride=1, downsample=None, noacti... method forward (line 85) | def forward(self, x): class RevBottleneck (line 95) | class RevBottleneck(nn.Module): method __init__ (line 98) | def __init__(self, inplanes, planes, stride=1, downsample=None, noacti... method forward (line 110) | def forward(self, x): class BottleneckSub (line 120) | class BottleneckSub(nn.Module): method __init__ (line 121) | def __init__(self, inplanes, planes, stride=1, noactivation=False): method forward (line 134) | def forward(self, x): class BasicBlockSub (line 148) | class BasicBlockSub(nn.Module): method __init__ (line 149) | def __init__(self, inplanes, planes, stride=1, noactivation=False): method forward (line 159) | def forward(self, x): class ResNet (line 170) | class ResNet(nn.Module): method __init__ (line 171) | def __init__(self, block, layers, num_classes=1000, channels_per_layer... method init_weights (line 206) | def init_weights(self): method configure (line 215) | def configure(self): method _make_layer (line 228) | def _make_layer(self, block, planes, blocks, stride=1, noactivation=Fa... method forward (line 242) | def forward(self, x): FILE: memcnn/models/revop.py function custom_fwd (line 13) | def custom_fwd(fwd=None, *, cast_inputs=None, device_type='cuda'): function custom_bwd (line 17) | def custom_bwd(bwd, device_type='cuda'): function custom_fwd (line 21) | def custom_fwd(fwd=None, *, cast_inputs=None, device_type='cuda'): function custom_bwd (line 26) | def custom_bwd(bwd, device_type='cuda'): class InvertibleCheckpointFunction (line 31) | class InvertibleCheckpointFunction(torch.autograd.Function): method forward (line 34) | def forward(ctx, fn, fn_inverse, keep_input, num_bwd_passes, preserve_... method backward (line 83) | def backward(ctx, *grad_outputs): # pragma: no cover class InvertibleModuleWrapper (line 134) | class InvertibleModuleWrapper(nn.Module): method __init__ (line 135) | def __init__(self, fn, keep_input=False, keep_input_inverse=False, num... method forward (line 199) | def forward(self, *xin): method inverse (line 230) | def inverse(self, *yin): class ReversibleBlock (line 262) | class ReversibleBlock(InvertibleModuleWrapper): method __init__ (line 263) | def __init__(self, Fm, Gm=None, coupling='additive', keep_input=False,... function create_coupling (line 338) | def create_coupling(Fm, Gm=None, coupling='additive', implementation_fwd... function is_invertible_module (line 350) | def is_invertible_module(module_in, test_input_shape, test_input_dtype=t... function get_device_states (line 453) | def get_device_states(*args): function set_device_states (line 467) | def set_device_states(devices, states): FILE: memcnn/models/tests/test_amp.py class InvertibleBlock (line 19) | class InvertibleBlock(nn.Module): method __init__ (line 20) | def __init__(self, block, keep_input, enabled=True): method forward (line 29) | def forward(self, x, inverse=False): class CheckPointBlock (line 36) | class CheckPointBlock(nn.Module): method __init__ (line 37) | def __init__(self, block): method forward (line 41) | def forward(self, x, inverse=False): function test_cuda_amp (line 53) | def test_cuda_amp(tmp_path, inv_enabled, amp_enabled, use_checkpointing): FILE: memcnn/models/tests/test_couplings.py function test_coupling_implementations_against_reference (line 17) | def test_coupling_implementations_against_reference(coupling, bwd, imple... function test_legacy_additive_coupling (line 107) | def test_legacy_additive_coupling(): function test_legacy_affine_coupling (line 113) | def test_legacy_affine_coupling(): FILE: memcnn/models/tests/test_is_invertible_module.py function test_is_invertible_module_with_invalid_inverse (line 8) | def test_is_invertible_module_with_invalid_inverse(): function test_is_invertible_module_random_seeds (line 16) | def test_is_invertible_module_random_seeds(random_seed): function test_is_invertible_module_shared_outputs (line 21) | def test_is_invertible_module_shared_outputs(): function test_is_invertible_module_shared_tensors (line 28) | def test_is_invertible_module_shared_tensors(): function test_is_invertible_module (line 45) | def test_is_invertible_module(): function test_is_invertible_module_wrapped (line 60) | def test_is_invertible_module_wrapped(): function test_is_invertible_module_type_check_input_shapes (line 83) | def test_is_invertible_module_type_check_input_shapes(input_shape): FILE: memcnn/models/tests/test_memory_saving.py function test_memory_saving_invertible_model_wrapper (line 12) | def test_memory_saving_invertible_model_wrapper(device, coupling, keep_i... FILE: memcnn/models/tests/test_models.py class MultiplicationInverse (line 7) | class MultiplicationInverse(torch.nn.Module): method __init__ (line 8) | def __init__(self, factor=2): method forward (line 12) | def forward(self, x): method inverse (line 15) | def inverse(self, y): class IdentityInverse (line 19) | class IdentityInverse(torch.nn.Module): method __init__ (line 20) | def __init__(self, multiply_forward=False, multiply_inverse=False): method forward (line 26) | def forward(self, x): method inverse (line 32) | def inverse(self, y): class MultiSharedOutputs (line 39) | class MultiSharedOutputs(torch.nn.Module): method forward (line 41) | def forward(self, x): method inverse (line 46) | def inverse(self, y, y2): class SubModule (line 51) | class SubModule(torch.nn.Module): method __init__ (line 52) | def __init__(self, in_filters=5, out_filters=5): method forward (line 57) | def forward(self, x): class SubModuleStack (line 61) | class SubModuleStack(torch.nn.Module): method __init__ (line 62) | def __init__(self, Gm, coupling='additive', depth=10, implementation_f... method forward (line 70) | def forward(self, x): method inverse (line 75) | def inverse(self, y): class SplitChannels (line 81) | class SplitChannels(torch.nn.Module): method __init__ (line 82) | def __init__(self, split_location): method forward (line 86) | def forward(self, x): method inverse (line 91) | def inverse(self, x, y): class ConcatenateChannels (line 95) | class ConcatenateChannels(torch.nn.Module): method __init__ (line 96) | def __init__(self, split_location): method forward (line 101) | def forward(self, x, y): method inverse (line 104) | def inverse(self, x): FILE: memcnn/models/tests/test_multi.py function test_multi (line 8) | def test_multi(disable): FILE: memcnn/models/tests/test_resnet.py function test_resnet (line 7) | def test_resnet(block, batch_norm_fix): FILE: memcnn/models/tests/test_revop.py function set_seeds (line 15) | def set_seeds(seed): function is_memory_cleared (line 24) | def is_memory_cleared(var, isclear, shape): function test_get_set_device_states (line 33) | def test_get_set_device_states(device, enabled): function test_reversible_block_notimplemented (line 54) | def test_reversible_block_notimplemented(coupling): function test_invertible_module_wrapper_fwd_bwd (line 88) | def test_invertible_module_wrapper_fwd_bwd(fn, bwd, keep_input, keep_inp... function test_chained_invertible_module_wrapper (line 161) | def test_chained_invertible_module_wrapper(coupling, adapter): function test_chained_invertible_module_wrapper_shared_fwd_and_bwd_train_passes (line 190) | def test_chained_invertible_module_wrapper_shared_fwd_and_bwd_train_pass... function test_invertible_module_wrapper_disabled_versus_enabled (line 276) | def test_invertible_module_wrapper_disabled_versus_enabled(inverted): function test_invertible_module_wrapper_simple_inverse (line 305) | def test_invertible_module_wrapper_simple_inverse(coupling): function test_normal_vs_invertible_module_wrapper (line 328) | def test_normal_vs_invertible_module_wrapper(coupling): FILE: memcnn/models/tests/test_split_dim.py class Check (line 8) | class Check(torch.nn.Module): method __init__ (line 9) | def __init__(self, dim, target_size): method forward (line 14) | def forward(self, fn_input): function test_split_dim (line 22) | def test_split_dim(dimension, coupling, input_size): FILE: memcnn/train.py function run_experiment (line 16) | def run_experiment(experiment_tags, data_dir, results_dir, start_fresh=F... function main (line 51) | def main(data_dir, results_dir): FILE: memcnn/trainers/classification.py function validate (line 11) | def validate(model, ceriterion, val_loader, device): function get_model_parameters_count (line 44) | def get_model_parameters_count(model): function train (line 48) | def train(manager, FILE: memcnn/trainers/tests/test_classification.py class SimpleTestingModel (line 11) | class SimpleTestingModel(torch.nn.Module): method __init__ (line 12) | def __init__(self, klasses): method forward (line 18) | def forward(self, x): function test_train (line 22) | def test_train(tmp_path): function test_train_with_nan_loss (line 46) | def test_train_with_nan_loss(tmp_path): FILE: memcnn/trainers/tests/test_train.py function test_main (line 16) | def test_main(tmp_path): function dummy_dataloaders (line 26) | def dummy_dataloaders(*args, **kwargs): function dummy_trainer (line 30) | def dummy_trainer(manager, *args, **kwargs): class DummyDataset (line 34) | class DummyDataset(object): method __init__ (line 35) | def __init__(self, *args, **kwargs): class DummyModel (line 39) | class DummyModel(torch.nn.Module): method __init__ (line 40) | def __init__(self, block): method forward (line 45) | def forward(self, x): function test_run_experiment (line 49) | def test_run_experiment(tmp_path): function test_train_networks (line 82) | def test_train_networks(tmp_path, network, use_cuda): FILE: memcnn/utils/log.py function setup (line 8) | def setup(use_stdout=True, filename=None, log_level=logging.DEBUG): class SummaryWriter (line 28) | class SummaryWriter(object): method __init__ (line 29) | def __init__(self, log_dir): method _load_if_exists (line 35) | def _load_if_exists(self): method add_scalar (line 40) | def add_scalar(self, name, value, iteration): method flush (line 45) | def flush(self): method close (line 49) | def close(self): FILE: memcnn/utils/loss.py function _assert_no_grad (line 6) | def _assert_no_grad(variable): class CrossEntropyLossTF (line 12) | class CrossEntropyLossTF(Module): method __init__ (line 13) | def __init__(self): method forward (line 16) | def forward(self, Ypred, Y, W=None): FILE: memcnn/utils/stats.py class AverageMeter (line 6) | class AverageMeter(object): method __init__ (line 8) | def __init__(self): method reset (line 11) | def reset(self): method update (line 17) | def update(self, val, n=1): function accuracy (line 24) | def accuracy(output, target, topk=(1,)): FILE: memcnn/utils/tests/test_log.py function test_setup (line 5) | def test_setup(tmp_path): function test_summary_writer (line 10) | def test_summary_writer(tmp_path): FILE: memcnn/utils/tests/test_loss.py function test_assert_no_grad (line 5) | def test_assert_no_grad(): function test_crossentropy_tf (line 11) | def test_crossentropy_tf(): FILE: memcnn/utils/tests/test_stats.py function test_average_meter (line 7) | def test_average_meter(val, n): function test_accuracy (line 21) | def test_accuracy(topk, klass, num_klasses=5): # output, target, FILE: setup.py class VerifyVersionCommand (line 17) | class VerifyVersionCommand(install): method run (line 21) | def run(self):