MCPcopy Create free account

hub / github.com/Correr-Zhou/SPML-AckTheUnknown / functions

Functions46 in github.com/Correr-Zhou/SPML-AckTheUnknown

↓ 14 callersFunctionneg_log
(x)
losses.py:156
↓ 5 callersMethodget_stop_metric
Query the stop metric.
instrumentation.py:69
↓ 4 callersMethodget_datasets
(self)
datasets.py:215
↓ 3 callersFunctioncheck_inputs
Helper function for input validation.
metrics.py:4
↓ 2 callersMethod__init__
(self, num_feats, num_classes)
models.py:14
↓ 2 callersFunctioncompute_metrics
Given predictions and labels, compute a few metrics.
instrumentation.py:156
↓ 2 callersFunctionget_metadata
(dataset_name)
datasets.py:11
↓ 2 callersFunctionget_random_label_indices
Given a 1D numpy array label_vec, return num_sel indices chosen at random from all indices where label_vec equals label_value. Note that
preproc/generate_observed_labels.py:14
↓ 2 callersFunctionparse_categories
(categories)
preproc/format_coco.py:13
↓ 2 callersMethodupdate_phase_data
Store data from a batch for later use in computing metrics.
instrumentation.py:76
↓ 1 callersFunctionaysmmetric_pseudo_labeling
(model, P, Z, logger, epoch, phase)
main.py:244
↓ 1 callersFunctioncompute_batch_loss
(batch, P, Z)
losses.py:114
↓ 1 callersMethodcompute_phase_metrics
Compute and store end-of-phase metrics.
instrumentation.py:43
↓ 1 callersFunctionexecute_training_run
Initialize, run the training process, and save the results. Parameters P: Dictionary of parameters, which completely specify the trainin
main.py:221
↓ 1 callersFunctiongenerate_split
Computes indices for a randomized split of num_ex objects into two parts, so we return two index vectors: idx_1 and idx_2. Note that idx_1 ha
datasets.py:79
↓ 1 callersFunctionget_imagenet_stats
Returns standard ImageNet statistics.
datasets.py:41
↓ 1 callersMethodget_logs
Return a copy of all log data.
instrumentation.py:135
↓ 1 callersFunctionget_transforms
Returns image transforms.
datasets.py:52
↓ 1 callersFunctioninitialize_training_run
Set up for model training. Parameters P: Dictionary of parameters, which completely specify the training procedure. feature_extracto
main.py:148
↓ 1 callersFunctionload_data
(base_path, P)
datasets.py:141
↓ 1 callersFunctionobserve_uniform
label_matrix: binary (-1/+1) label matrix with shape num_items x num_classes num_pos: number of positive labels to observe for each item
preproc/generate_observed_labels.py:36
↓ 1 callersMethodreport
(self, t_i, t_f, phase, epoch)
instrumentation.py:143
↓ 1 callersMethodreset_phase_data
Reset for a new phase.
instrumentation.py:92
↓ 1 callersFunctionrun_eval_phase
Run one evaluation phase. Parameters model: Model to train. P: Dictionary of parameters, which completely specify the training proce
main.py:55
↓ 1 callersFunctionrun_train_phase
Run one training phase. Parameters model: Model to train. P: Dictionary of parameters, which completely specify the training procedu
main.py:16
↓ 1 callersFunctiontrain
Train the model. Parameters P: Dictionary of parameters, which completely specify the training procedure. Z: Dictionary of temporary
main.py:90
↓ 1 callersMethodupdate_best_results
Update the current best epoch info if applicable.
instrumentation.py:106
Method__getitem__
(self,idx)
datasets.py:235
Method__init__
(self, P, model_feature_extractor=None, model_linear_classifier=None)
models.py:25
Method__init__
(self, P, feature_extractor, linear_classifier)
models.py:88
Method__init__
(self, P, tx)
datasets.py:154
Method__init__
(self, dataset_name, image_ids, label_matrix, label_matrix_obs, feats, tx, use_feats)
datasets.py:220
Method__init__
(self, params)
instrumentation.py:13
Method__len__
(self)
datasets.py:232
Functioncompute_avg_precision
Compute average precision. Parameters targs: Binary targets. preds: Predicted probability scores.
metrics.py:17
Functioncompute_precision_at_k
Compute precision@k. Parameters targs: Binary targets. preds: Predicted probability scores. k: Number of predictions to con
metrics.py:37
Functioncompute_recall_at_k
Compute recall@k. Parameters targs: Binary targets. preds: Predicted probability scores. k: Number of predictions to consid
metrics.py:60
Methodforward
(self, x)
models.py:18
Methodforward
(self, x)
models.py:76
Methodforward
(self, batch)
models.py:92
Functionget_data
Given a parameter dictionary P, initialize and return the specified dataset.
datasets.py:99
Functionloss_EM
(batch, P, Z)
losses.py:55
Functionloss_EM_APL
(batch, P, Z)
losses.py:75
Functionloss_an
(batch, P, Z)
losses.py:39
Functionloss_bce
(batch, P, Z)
losses.py:9
Functionloss_iun
(batch, P, Z)
losses.py:24