Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Correr-Zhou/SPML-AckTheUnknown
/ functions
Functions
46 in github.com/Correr-Zhou/SPML-AckTheUnknown
⨍
Functions
46
◇
Types & classes
6
↓ 14 callers
Function
neg_log
(x)
losses.py:156
↓ 5 callers
Method
get_stop_metric
Query the stop metric.
instrumentation.py:69
↓ 4 callers
Method
get_datasets
(self)
datasets.py:215
↓ 3 callers
Function
check_inputs
Helper function for input validation.
metrics.py:4
↓ 2 callers
Method
__init__
(self, num_feats, num_classes)
models.py:14
↓ 2 callers
Function
compute_metrics
Given predictions and labels, compute a few metrics.
instrumentation.py:156
↓ 2 callers
Function
get_metadata
(dataset_name)
datasets.py:11
↓ 2 callers
Function
get_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 callers
Function
parse_categories
(categories)
preproc/format_coco.py:13
↓ 2 callers
Method
update_phase_data
Store data from a batch for later use in computing metrics.
instrumentation.py:76
↓ 1 callers
Function
aysmmetric_pseudo_labeling
(model, P, Z, logger, epoch, phase)
main.py:244
↓ 1 callers
Function
compute_batch_loss
(batch, P, Z)
losses.py:114
↓ 1 callers
Method
compute_phase_metrics
Compute and store end-of-phase metrics.
instrumentation.py:43
↓ 1 callers
Function
execute_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 callers
Function
generate_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 callers
Function
get_imagenet_stats
Returns standard ImageNet statistics.
datasets.py:41
↓ 1 callers
Method
get_logs
Return a copy of all log data.
instrumentation.py:135
↓ 1 callers
Function
get_transforms
Returns image transforms.
datasets.py:52
↓ 1 callers
Function
initialize_training_run
Set up for model training. Parameters P: Dictionary of parameters, which completely specify the training procedure. feature_extracto
main.py:148
↓ 1 callers
Function
load_data
(base_path, P)
datasets.py:141
↓ 1 callers
Function
observe_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 callers
Method
report
(self, t_i, t_f, phase, epoch)
instrumentation.py:143
↓ 1 callers
Method
reset_phase_data
Reset for a new phase.
instrumentation.py:92
↓ 1 callers
Function
run_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 callers
Function
run_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 callers
Function
train
Train the model. Parameters P: Dictionary of parameters, which completely specify the training procedure. Z: Dictionary of temporary
main.py:90
↓ 1 callers
Method
update_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
Function
compute_avg_precision
Compute average precision. Parameters targs: Binary targets. preds: Predicted probability scores.
metrics.py:17
Function
compute_precision_at_k
Compute precision@k. Parameters targs: Binary targets. preds: Predicted probability scores. k: Number of predictions to con
metrics.py:37
Function
compute_recall_at_k
Compute recall@k. Parameters targs: Binary targets. preds: Predicted probability scores. k: Number of predictions to consid
metrics.py:60
Method
forward
(self, x)
models.py:18
Method
forward
(self, x)
models.py:76
Method
forward
(self, batch)
models.py:92
Function
get_data
Given a parameter dictionary P, initialize and return the specified dataset.
datasets.py:99
Function
loss_EM
(batch, P, Z)
losses.py:55
Function
loss_EM_APL
(batch, P, Z)
losses.py:75
Function
loss_an
(batch, P, Z)
losses.py:39
Function
loss_bce
(batch, P, Z)
losses.py:9
Function
loss_iun
(batch, P, Z)
losses.py:24