mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: The basic idea of bucket-based calibration: 1. given a model and a calibration data set 2. apply the model to the calibration data set and sort the prediction scores 3. bucketize the prediction scores 4. for the samples in each bucket, compute the proportion of positive samples 5. build a set of piecewise linear functions that map from the bucket range to the proportion 6. appends an operator of piecewise linear transform to the prediction net that is supposed to calibrate the raw predictions. 7. to support calibration in realtime training, we create a new type of Net -- bucket calibration net. This needs a new Context to add_calibration_ops(), to export and load the new Net. This includes a series of diffs. This diff implements a layer that adds different operators for train/cali/eval for bucket based calibration. Reviewed By: dragonxlwang Differential Revision: D4817119 fbshipit-source-id: 44f8fcad2a94f40f7439cc1ad47e7bae5e17397d |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| batch_distill_lr_loss.py | ||
| batch_lr_loss.py | ||
| batch_mse_loss.py | ||
| batch_sigmoid_cross_entropy_loss.py | ||
| batch_softmax_loss.py | ||
| concat.py | ||
| dot_product.py | ||
| expand_dims.py | ||
| fc_without_bias.py | ||
| fc.py | ||
| functional.py | ||
| layers.py | ||
| optimizers.py | ||
| sampling_train.py | ||
| sampling_trainable_mixin.py | ||
| simple_operator_layers.py | ||
| sparse_lookup.py | ||
| sparse_to_dense.py | ||
| split.py | ||
| tags.py | ||
| uniform_sampling.py | ||