MCPcopy Create free account

hub / github.com/davidstutz/confidence-calibrated-adversarial-training / functions

Functions916 in github.com/davidstutz/confidence-calibrated-adversarial-training

↓ 560 callersMethoddistributionAt
(self, label, confidence, labels=10)
tests/test_eval.py:12
↓ 171 callersMethodconfidence_at_tpr
Confidence threshold for given true positive rate. :param tpr: true positive rate in [0, 1] :type tpr: float :return
common/eval/adversarial_evaluation.py:249
↓ 114 callersMethodconfidence_at_tpr
Confidence threshold for given true positive rate. :param tpr: true positive rate in [0, 1] ;type tpr: float :return
common/eval/distal_evaluation.py:179
↓ 87 callersMethodadd_scalar
Add scalar value. :param tag: tag for scalar :type tag: str :param value: value :type value: mixed :
common/summary.py:55
↓ 73 callersMethodconfidence_at_tpr
Confidence threshold for given true positive rate. :param tpr: true positive rate in [0, 1] ;type tpr: float :return
common/eval/corrupted_evaluation.py:188
↓ 70 callersMethoddetach
Detach a key. :param key: log file name :type key: str
common/log.py:179
↓ 64 callersMethodfpr_at_confidence
False positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/adversarial_evaluation.py:304
↓ 64 callersMethodtpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/adversarial_evaluation.py:275
↓ 62 callersMethodtest_error_at_confidence
Test error for given confidence threshold. :param threshold: confidence threshold :type threshold: float :return tes
common/eval/adversarial_evaluation.py:350
↓ 58 callersMethodrobust_test_error_at_confidence
Robust test error for given confidence threshold. :param threshold: confidence threshold :type threshold: float :ret
common/eval/adversarial_evaluation.py:428
↓ 51 callersFunctionlog
Quick access to logger instance. :param message: message or variable to log :type message: mixed :param level: level, i.e. color
common/log.py:244
↓ 50 callersMethodappend_layer
Add a layer. :param name: layer name :type name: str :param layer: layer :type layer: torch.nn.Module
models/classifier.py:90
↓ 45 callersMethodconfidence_at_tpr
Confidence threshold for given true positive rate. :param tpr: true positive rate in [0, 1] :type tpr: float :return
common/eval/clean_evaluation.py:98
↓ 44 callersMethodfpr_at_confidence
False positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/distal_evaluation.py:282
↓ 44 callersMethodtpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/distal_evaluation.py:205
↓ 42 callersMethodrunTestAttackPerformance
(self, attack, attempts=5, objective=attacks.objectives.UntargetedF0Objective())
tests/test_attacks_normal.py:104
↓ 40 callersMethodadd_histogram
Add histogram data. :param tag: tag :type tag: str :param values: values :type values: torch.Tensor or numpy
common/summary.py:87
↓ 35 callersMethodload
Load a state. :param filepath: file to load :type filepath: str :return: state :rtype: State
common/state.py:96
↓ 32 callersMethodtest_error_at_confidence
Test error for given confidence threshold. :param threshold: confidence threshold :type threshold: float :return tes
common/eval/corrupted_evaluation.py:265
↓ 31 callersMethodcorrupted_test_error_at_confidence
Test error for given confidence threshold. :param threshold: confidence threshold :type threshold: float :return tes
common/eval/corrupted_evaluation.py:313
↓ 31 callersMethodtest
Test step. :param epoch: epoch :type epoch: int
common/train/normal_training.py:145
↓ 30 callersMethodtpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/clean_evaluation.py:121
↓ 29 callersMethodstep
Training + test step. :param epoch: epoch :type epoch: int
common/train/training_interface.py:65
↓ 27 callersMethodadd_text
Add images. :param tag: tag :type tag: str :param text_string: test :type text_string: str :param gl
common/summary.py:161
↓ 26 callersMethodtest_error
Test error. :return: test error :rtype: float
common/eval/adversarial_evaluation.py:340
↓ 25 callersFunctiondata_file
Generate path to data file. :param name: name of file :type name: str :param ext: extension (including period) :type ext: str
common/paths.py:38
↓ 24 callersMethodfpr_at_confidence
False positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/corrupted_evaluation.py:351
↓ 24 callersMethodrobust_test_error
Robust test error. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:388
↓ 24 callersMethodtest_error
Test error. :return: test error :rtype: float
common/eval/clean_evaluation.py:158
↓ 24 callersMethodtpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/corrupted_evaluation.py:214
↓ 22 callersMethodmain
Main.
experiments/train.py:50
↓ 21 callersMethodrunTestAttackProjections
(self, attack, epsilon, objective=attacks.objectives.UntargetedF0Objective())
tests/test_attacks_normal.py:88
↓ 19 callersFunction__attack_config
Attack configuration. :param directory: directory for perturbations :type directory: str :param attack: attack :type attack: att
experiments/config/common.py:1092
↓ 18 callersMethodforward
(self, x_nat, y_nat)
attacks/batch_corner_search.py:172
↓ 17 callersFunction__untargeted_f0
Untargeted loss objective, default is cross-entropy. :param loss: loss to maximize :type loss: callable :return: objective :rtyp
experiments/config/common.py:883
↓ 15 callersMethodcheckpoint
Quick access to State.save. :param filepath: path to file :type filepath: str :param model: model :type mode
common/state.py:76
↓ 15 callersMethodflush
Flush.
common/summary.py:177
↓ 14 callersMethodset
Set true or target classes. Target classes might be None for untargeted attacks. :param true_classes: true classes :type tru
attacks/objectives.py:22
↓ 13 callersMethodcorrupted_test_error
Test error. :return: test error :rtype: float
common/eval/corrupted_evaluation.py:303
↓ 12 callersMethodrun
Run attack. :param model: model to attack :type model: torch.nn.Module :param images: images :type images: t
attacks/attack.py:19
↓ 12 callersMethodtest_error
Test error. :return: test error :rtype: float
common/eval/corrupted_evaluation.py:255
↓ 11 callersMethod__init__
(self, indices=None, resize=None)
common/datasets.py:431
↓ 9 callersMethodsave
Save the state. :param filepath: file to save to :type filepath: str
common/state.py:37
↓ 8 callersMethodsuccess
Get success. :param logits: logit output of the network :type logits: torch.autograd.Variable :return: success
attacks/objectives.py:57
↓ 8 callersMethodtest_error_at_confidence
Test error for given confidence threshold. :param threshold: confidence threshold :type threshold: float :return tes
common/eval/clean_evaluation.py:168
↓ 7 callersMethodget_instance
Get current log instance, simple singleton. :return: log :rtype: Log
common/log.py:204
↓ 7 callersMethodprogress
Report progress. :param epoch: epoch :type epoch: int :param batch: batch :type batch: int :param ba
common/train/training_interface.py:26
↓ 7 callersMethodreceiver_operating_characteristic_auc
Computes the ROC curve for correct classified vs. incorrect classified. :return: ROC AUC score :rtype: float
common/eval/clean_evaluation.py:216
↓ 7 callersMethodrunTestAttackPerformance
(self, attack, attempts=5)
tests/test_distal_attacks_normal.py:82
↓ 7 callersFunctionsave_latex
Save latex file. :param filepath: path to file :rtype filepath: str :param latex: latex code :type latex: str
experiments/eval/misc.py:522
↓ 7 callersMethodtarget_confidence
True confidence. :param logits: logit output of the network :type logits: torch.autograd.Variable :return: true conf
attacks/objectives.py:88
↓ 7 callersMethodtrue_confidence
True confidence. :param logits: logit output of the network :type logits: torch.autograd.Variable :return: true conf
attacks/objectives.py:72
↓ 7 callersMethodvalidate
Check validity.
common/experiments.py:410
↓ 6 callersMethodadd_images
Add images. :param tag: tag :type tag: str :param img_tensor: images :type img_tensor: torch.Tensor or numpy
common/summary.py:125
↓ 6 callersMethodrunTestAttackPerformance
(self, attack, attempts=5, objective=attacks.objectives.UntargetedF0Objective())
tests/test_attacks_adversarial.py:94
↓ 6 callersMethodtestTrainModel
(self, model)
tests/test_train_models.py:27
↓ 6 callersMethodupdate_queue
Update queue.
common/summary.py:587
↓ 5 callersMethod__init__
Constructor. :param args: shape :type args: [int]
common/torch.py:701
↓ 5 callersMethodalternative_robust_test_error_at_confidence
Robust test error for given confidence threshold. :param threshold: confidence threshold :type threshold: float :ret
common/eval/adversarial_evaluation.py:398
↓ 5 callersMethodfpr_at_99tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/clean_evaluation.py:382
↓ 5 callersMethodfpr_at_confidence
False positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/clean_evaluation.py:146
↓ 5 callersMethodreceiver_operating_characteristic_auc
Computes the ROC curve for correct classified vs. incorrect classified. :return: ROC AUC score :rtype: float
common/eval/adversarial_evaluation.py:550
↓ 5 callersMethodrobust_test_error_at_99tpr
Robust test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:876
↓ 4 callersMethod__init__
Constructor.
common/experiments.py:393
↓ 4 callersMethod_make_layer
(self, block, planes, num_blocks, stride)
models/preact_resnet.py:65
↓ 4 callersMethodconfidence_at_99tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/clean_evaluation.py:262
↓ 4 callersFunctionexpand_as
Expands the tensor using view to allow broadcasting. :param tensor: input tensor :type tensor: torch.Tensor or torch.autograd.Variable
common/torch.py:437
↓ 4 callersMethodfmargin
(self, x, y)
attacks/batch_cube2.py:12
↓ 4 callersMethodlog
Log a message. :param message: message or variable to log :type message: mixed :param level: level, i.e. color
common/log.py:226
↓ 4 callersFunctionp_selection
The schedule was adapted for mnist/cifar10, but not for imagenet
attacks/batch_cube2.py:22
↓ 4 callersMethodrunTestDeterministicAttack
(self, attack, objective=attacks.objectives.UntargetedF0Objective())
tests/test_attacks_normal.py:122
↓ 4 callersMethodsuccess_rate
Success rate. :return: success rate :rtype: float
common/eval/adversarial_evaluation.py:499
↓ 4 callersMethodsuccess_rate_at_confidence
Success rate at confidence threshold. :param threshold: confidence threshold :type threshold: float :return: success
common/eval/adversarial_evaluation.py:509
↓ 4 callersMethodtest_error_at_confidence
Test error for given confidence threshold. :param threshold: confidence threshold :type threshold: float :return tes
common/eval/distal_evaluation.py:244
↓ 4 callersMethodtimestamp
Print timestamp. :return: date and time :rtype: str
common/log.py:88
↓ 4 callersMethodtnr_at_confidence
True negative rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/corrupted_evaluation.py:226
↓ 4 callersMethodtnr_at_confidence
False positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/adversarial_evaluation.py:328
↓ 4 callersMethodtnr_at_confidence
False positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/distal_evaluation.py:294
↓ 4 callersMethodvalidation_tpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/corrupted_evaluation.py:238
↓ 4 callersMethodvalidation_tpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/adversarial_evaluation.py:287
↓ 4 callersMethodvalidation_tpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/clean_evaluation.py:133
↓ 4 callersMethodvalidation_tpr_at_confidence
True positive rate at confidence threshold. :param threshold: confidence threshold in [0, 1] :type threshold: float
common/eval/distal_evaluation.py:217
↓ 3 callersMethod__init__
(self, min=0, max=1, name=None, deterministic=False, random_state=None)
common/imgaug.py:49
↓ 3 callersMethod_files
Get files. :return: files :rtype: [File]
common/log.py:193
↓ 3 callersMethod_wide_layer
(self, block, planes, blocks, stride)
models/wide_resnet.py:104
↓ 3 callersMethodelapsed
Get elapsed time in seconds :return: elapsed time in seconds :rtype: float
common/timer.py:24
↓ 3 callersFunctionflat2square
returns the position and the perturbation given the index of an image of the batch of all the possible perturbations
attacks/batch_corner_search.py:72
↓ 3 callersMethodgetModelFile
(cls)
tests/test_attacks_normal.py:69
↓ 3 callersMethodgetModelFile
(cls)
tests/test_distal_attacks_normal.py:65
↓ 3 callersMethodgetModelFile
(cls)
tests/test_attacks_adversarial.py:75
↓ 3 callersFunctionis_cuda
Check if model/tensor is on CUDA. :param mixed: model or tensor :type mixed: torch.nn.Module or torch.autograd.Variable or torch.Tensor
common/torch.py:46
↓ 3 callersMethodkwargs_get
Get argument if not None. :param key: key :type key: str :param default: default value :type default: mixed
models/classifier.py:73
↓ 3 callersFunctionmakedir
Creates directory if it does not exist. :param dir: directory path :type dir: str
common/utils.py:210
↓ 3 callersMethodnormalize
Normalization. :param gradients: gradients :type gradients: torch.autograd.Variable
attacks/norms.py:20
↓ 3 callersMethodreceiver_operating_characteristic_auc
Computes the ROC curve for correct classified vs. incorrect classified. :return: ROC AUC score :rtype: float
common/eval/distal_evaluation.py:325
↓ 3 callersMethodrun
Run attack. :param model: model to attack :type model: torch.nn.Module :param images: images :type images: t
attacks/batch_gradient_descent.py:54
↓ 3 callersMethodtest_error
Test error. :return: test error :rtype: float
common/eval/distal_evaluation.py:234
↓ 3 callersMethodtest_error_at_99tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:796
↓ 2 callersFunction__adversarial_training
Adversarial training configuration. :param directory: directory for models :type directory: str :param attack: attack for adversaria
experiments/config/common.py:986
↓ 2 callersMethod__init__
Constructor.
attacks/objectives.py:11
next →1–100 of 916, ranked by callers