MCPcopy Create free account

hub / github.com/alexrame/fishr / functions

Functions228 in github.com/alexrame/fishr

↓ 48 callersFunction_hparam
Define a hyperparameter. random_val_fn takes a RandomState and returns a random hyperparameter value.
domainbed/hparams_registry.py:19
↓ 42 callersMethodmean
(self)
domainbed/lib/query.py:129
↓ 23 callersMethod__init__
(self, input_shape, num_classes, num_domains, hparams)
domainbed/algorithms.py:912
↓ 22 callersMethodsum
(self)
domainbed/lib/query.py:123
↓ 10 callersMethodfilter
(self, fn)
domainbed/lib/query.py:146
↓ 9 callersMethod__init__
(self, root, test_envs, hparams)
domainbed/datasets.py:223
↓ 9 callersMethodselect
(self, selector)
domainbed/lib/query.py:113
↓ 8 callersMethodmap
map self onto fn. If fn takes multiple args, tuple-unpacking is applied.
domainbed/lib/query.py:103
↓ 6 callersFunctiondownload_and_extract
(url, dst, remove=True)
domainbed/scripts/download.py:29
↓ 6 callersFunctionstage_path
(data_dir, name)
domainbed/scripts/download.py:20
↓ 5 callersMethod__init__
(self, n_inputs, n_outputs, hparams)
domainbed/networks.py:47
↓ 5 callersMethodgroup
Group elements by selector and return a list of (group, group_records) tuples.
domainbed/lib/query.py:80
↓ 5 callersMethodpredict
(self, x)
domainbed/algorithms.py:111
↓ 5 callersMethodstd
(self)
domainbed/lib/query.py:134
↓ 5 callersMethodunique
(self)
domainbed/lib/query.py:163
↓ 4 callersMethodfilter_equals
like [x for x in y if x.selector == value]
domainbed/lib/query.py:149
↓ 4 callersFunctionformat_mean
Given a list of datapoints, return a string describing their mean and standard error
domainbed/scripts/collect_results.py:26
↓ 4 callersFunctionmake_environment
(images, labels, e, grayscale=False)
coloredmnist/train_coloredmnist.py:92
↓ 4 callersFunctionmake_selector_fn
If selector is a function, return selector. Otherwise, return a function corresponding to the selector string. Examples of valid selector
domainbed/lib/query.py:16
↓ 4 callersFunctionprint_table
Pretty-print a 2D array of data, optionally with row/col labels
domainbed/scripts/collect_results.py:38
↓ 4 callersMethodsorted
(self, key=None)
domainbed/lib/query.py:173
↓ 3 callersMethod_prototype
(self, other, op)
domainbed/lib/misc.py:198
↓ 3 callersMethod_wide_layer
(self, block, planes, num_blocks, dropout_rate, stride)
domainbed/lib/wide_resnet.py:87
↓ 3 callersMethodargmax
(self, selector)
domainbed/lib/query.py:142
↓ 3 callersMethodgaussian_kernel
(self, x, y, gamma=[0.001, 0.01, 0.1, 1, 10, 100, 1000])
domainbed/algorithms.py:606
↓ 3 callersMethodupdate
(self, dict_data)
domainbed/lib/misc.py:39
↓ 2 callersMethod__init__
(self, fname, mode="a")
domainbed/lib/misc.py:177
↓ 2 callersFunction_hparams
Global registry of hyperparams. Each entry is a (default, random) tuple. New algorithms / networks / etc. should add entries here.
domainbed/hparams_registry.py:10
↓ 2 callersMethod_init_optimizer
(self)
domainbed/algorithms.py:1195
↓ 2 callersFunctionask_for_confirmation
()
domainbed/scripts/sweep.py:130
↓ 2 callersMethodforward_s
(self, x)
domainbed/algorithms.py:790
↓ 2 callersMethodfreeze_bn
(self)
domainbed/networks.py:113
↓ 2 callersFunctionget_test_records
Given records with a common test env, get the test records (i.e. the records with *only* that single test env and no other test envs)
domainbed/model_selection.py:6
↓ 2 callersFunctionhashable
(obj)
domainbed/lib/query.py:46
↓ 2 callersMethodhparams_accs
Given all records from a single (dataset, algorithm, test env) pair, return a sorted list of (run_acc, records) tuples.
domainbed/model_selection.py:27
↓ 2 callersFunctionl2_between_grads_variance
(cov_1, cov_2)
coloredmnist/train_coloredmnist.py:196
↓ 2 callersMethodmax
(self)
domainbed/lib/query.py:120
↓ 2 callersFunctionmean_nll
(logits, y)
coloredmnist/train_coloredmnist.py:153
↓ 2 callersMethodmin
(self)
domainbed/lib/query.py:117
↓ 2 callersFunctionpretty_print
(*values)
coloredmnist/train_coloredmnist.py:207
↓ 2 callersFunctionrandom_pairs_of_minibatches
(minibatches)
domainbed/lib/misc.py:134
↓ 2 callersMethodrandomize
(self, x, what="style", eps=1e-5)
domainbed/algorithms.py:794
↓ 2 callersFunctionsave_checkpoint
(filename)
domainbed/scripts/train.py:193
↓ 2 callersMethodsweep_acc
Given all records from a single (dataset, algorithm, test env) pair, return the mean test acc of the k runs with the top val accs.
domainbed/model_selection.py:43
↓ 2 callersFunctiontorch_bernoulli
(p, size)
coloredmnist/train_coloredmnist.py:94
↓ 2 callersMethodtorch_bernoulli_
(self, p, size)
domainbed/datasets.py:149
↓ 2 callersFunctiontorch_xor
(a, b)
coloredmnist/train_coloredmnist.py:97
↓ 2 callersMethodtorch_xor_
(self, a, b)
domainbed/datasets.py:152
↓ 2 callersMethodtrain
Override the default train() to freeze the BN parameters
domainbed/networks.py:106
↓ 2 callersMethodwrite
(self, message)
domainbed/lib/misc.py:181
↓ 1 callersFunctionClassifier
(in_features, out_features, is_nonlinear=False)
domainbed/networks.py:198
↓ 1 callersFunctionFeaturizer
Auto-select an appropriate featurizer for the given input shape.
domainbed/networks.py:184
↓ 1 callersMethod__add__
(self, other)
domainbed/lib/misc.py:206
↓ 1 callersMethod__init__
(self, in_planes, planes, dropout_rate, stride=1)
domainbed/lib/wide_resnet.py:38
↓ 1 callersMethod__init__
(self, dataset, batch_size, num_workers)
domainbed/lib/fast_data_loader.py:51
↓ 1 callersMethod__neg__
(self)
domainbed/lib/misc.py:214
↓ 1 callersMethod_append
Unsafe, be careful you know what you're doing.
domainbed/lib/query.py:76
↓ 1 callersMethod_compute_distance_grads_var
(self, grads_var_per_domain)
domainbed/algorithms.py:1272
↓ 1 callersMethod_get_grads
(self, logits, y)
domainbed/algorithms.py:1235
↓ 1 callersMethod_get_grads_var_per_domain
(self, dict_grads, len_minibatches)
domainbed/algorithms.py:1252
↓ 1 callersMethod_irm_penalty
(logits, y)
domainbed/algorithms.py:314
↓ 1 callersMethod_step_acc
Return the {val_acc, test_acc} for a group of records corresponding to a single step.
domainbed/model_selection.py:107
↓ 1 callersFunctionall_test_env_combinations
For a dataset with n >= 3 envs, return all combinations of 1 and 2 test envs.
domainbed/scripts/sweep.py:87
↓ 1 callersMethodcompute_fishr_penalty
(self, all_logits, all_y, len_minibatches)
domainbed/algorithms.py:1230
↓ 1 callersFunctioncompute_grads_variance
(features, labels, classifier)
coloredmnist/train_coloredmnist.py:168
↓ 1 callersFunctioncompute_irm_penalty
(logits, y)
coloredmnist/train_coloredmnist.py:160
↓ 1 callersFunctionconv3x3
(in_planes, out_planes, stride=1)
domainbed/lib/wide_resnet.py:17
↓ 1 callersMethodcreate_clone
(self, device)
domainbed/algorithms.py:134
↓ 1 callersMethoddelete
(jobs)
domainbed/scripts/sweep.py:81
↓ 1 callersFunctiondownload_domain_net
(data_dir)
domainbed/scripts/download.py:141
↓ 1 callersFunctiondownload_mnist
(data_dir)
domainbed/scripts/download.py:107
↓ 1 callersFunctiondownload_office_home
(data_dir)
domainbed/scripts/download.py:128
↓ 1 callersFunctiondownload_pacs
(data_dir)
domainbed/scripts/download.py:115
↓ 1 callersFunctiondownload_terra_incognita
(data_dir)
domainbed/scripts/download.py:167
↓ 1 callersFunctiondownload_vlcs
(data_dir)
domainbed/scripts/download.py:97
↓ 1 callersMethodfilter_not_none
(self)
domainbed/lib/query.py:154
↓ 1 callersMethodfish
(self, meta_weights, inner_weights, lr_meta)
domainbed/algorithms.py:146
↓ 1 callersMethodflush
(self)
domainbed/lib/misc.py:186
↓ 1 callersFunctionformat_val
(x)
domainbed/lib/misc.py:104
↓ 1 callersFunctionformat_val
(v)
coloredmnist/train_coloredmnist.py:210
↓ 1 callersMethodforward_c
(self, x)
domainbed/algorithms.py:786
↓ 1 callersFunctionget_dataset_class
Return the dataset class with the given name.
domainbed/datasets.py:36
↓ 1 callersFunctionl2_between_dicts
(dict_1, dict_2)
domainbed/lib/misc.py:22
↓ 1 callersMethodlaunch
(jobs, launcher_fn)
domainbed/scripts/sweep.py:69
↓ 1 callersFunctionmake_args_list
(n_trials, dataset_names, algorithms, n_hparams_from, n_hparams, steps, data_dir, task, holdout_fraction,
domainbed/scripts/sweep.py:98
↓ 1 callersMethodmask_grads
(self, tau, gradients, params)
domainbed/algorithms.py:962
↓ 1 callersMethodmask_grads
Here a mask with continuous values in the range [0,1] is formed to control the amount of update for each parameter based on the agree
domainbed/algorithms.py:1147
↓ 1 callersFunctionmean_accuracy
(logits, y)
coloredmnist/train_coloredmnist.py:156
↓ 1 callersMethodmmd
(self, x, y)
domainbed/algorithms.py:615
↓ 1 callersMethodmy_cdist
(self, x1, x2)
domainbed/algorithms.py:598
↓ 1 callersMethodpredict
(self, x, env=None)
domainbed/algorithms.py:726
↓ 1 callersFunctionprint_results_tables
Given all records, print a results table for each dataset.
domainbed/scripts/collect_results.py:69
↓ 1 callersMethodreset_weights
(self, weights)
domainbed/networks.py:224
↓ 1 callersMethodrun_acc
Given records from a run, return a {val_acc, test_acc} dict representing the best val-acc and corresponding test-acc for that run.
domainbed/model_selection.py:19
↓ 1 callersMethodupdate
(self, minibatches, unlabeled=None)
domainbed/algorithms.py:916
↓ 1 callersMethodupdate_embeddings_
(self, features, env=None)
domainbed/algorithms.py:715
Method__eq__
(self, other)
domainbed/lib/query.py:64
Method__getitem__
(self, index)
domainbed/datasets.py:54
Method__getitem__
(self, key)
domainbed/lib/misc.py:116
Method__getitem__
(self, key)
domainbed/lib/query.py:61
next →1–100 of 228, ranked by callers