Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/davidstutz/confidence-calibrated-adversarial-training
/ functions
Functions
916 in github.com/davidstutz/confidence-calibrated-adversarial-training
⨍
Functions
916
◇
Types & classes
159
Method
add_image
Add image. :param tag: tag :type tag: str :param img_tensor: image :type img_tensor: torch.Tensor or numpy.n
common/summary.py:438
Method
add_image
Add image. :param tag: tag :type tag: str :param img_tensor: image :type img_tensor: torch.Tensor or numpy.n
common/summary.py:668
Method
add_images
Add images. :param tag: tag :type tag: str :param img_tensor: images :type img_tensor: torch.Tensor or numpy
common/summary.py:274
Method
add_images
Add images. :param tag: tag :type tag: str :param img_tensor: images :type img_tensor: torch.Tensor or numpy
common/summary.py:475
Method
add_images
Add images. :param tag: tag :type tag: str :param img_tensor: images :type img_tensor: torch.Tensor or numpy
common/summary.py:706
Method
add_scalar
Add scalar value. :param tag: tag for scalar :type tag: str :param value: value :type value: mixed :
common/summary.py:200
Method
add_scalar
Add scalar value. :param tag: tag for scalar :type tag: str :param value: value :type value: mixed :
common/summary.py:335
Method
add_scalar
Add scalar value. :param tag: tag for scalar :type tag: str :param value: value :type value: mixed :
common/summary.py:370
Method
add_scalar
Add scalar value. :param tag: tag for scalar :type tag: str :param value: value :type value: mixed :
common/summary.py:597
Method
add_scalars
Add scalar values. :param tag: tag for scalar :type tag: str :param tag_scalar_dict: values :type tag_scalar
common/summary.py:217
Method
add_scalars
Add scalar values. :param tag: tag for scalar :type tag: str :param tag_scalar_dict: values :type tag_scalar
common/summary.py:389
Method
add_scalars
Add scalar values. :param tag: tag for scalar :type tag: str :param tag_scalar_dict: values :type tag_scalar
common/summary.py:617
Method
add_text
Add images. :param tag: tag :type tag: str :param text_string: test :type text_string: str :param gl
common/summary.py:312
Method
add_text
Add images. :param tag: tag :type tag: str :param text_string: test :type text_string: str :param gl
common/summary.py:530
Method
add_text
Add images. :param tag: tag :type tag: str :param text_string: test :type text_string: str :param gl
common/summary.py:762
Method
alternative_robust_test_error_at_95tpr
Robust test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:896
Method
alternative_robust_test_error_at_98tpr
Robust test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:906
Method
alternative_robust_test_error_at_995tpr
Robust test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:926
Method
alternative_robust_test_error_at_99tpr
Robust test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:916
Method
alternative_robust_test_error_curve
Robust test error curve. :return: robust test errors and thresholds :rtype: numpy.ndarray, numpy.ndarray
common/eval/adversarial_evaluation.py:472
Function
as_variable
Get a tensor or numpy array as variable. :param mixed: input tensor :type mixed: torch.Tensor or numpy.ndarray :param device: gpu or
common/torch.py:388
Method
attach
Attach a file to write to. :param file: log file :type file: file
common/log.py:170
Function
bhattacharyya_divergence
Loss. :param logits: predicted logits :type logits: torch.autograd.Variable :param targets: target distributions :type targets:
common/torch.py:610
Function
binary_labels
Convert 0,1 labels to -1,1 labels. :param classes: classes as B x 1 :type classes: torch.autograd.Variable or torch.Tensor
common/torch.py:234
Function
bits2MB
Convert bits to MB. :param bits: number of bits :type bits: int :return: MiB :rtype: float
common/torch.py:189
Function
bits2MiB
Convert bits to MiB. :param bits: number of bits :type bits: int :return: MiB :rtype: float
common/torch.py:176
Function
bytes2MB
Convert bytes to MB. :param bytes: number of bytes :type bytes: int :return: MiB :rtype: float
common/torch.py:215
Function
bytes2MiB
Convert bytes to MiB. :param bytes: number of bytes :type bytes: int :return: MiB :rtype: float
common/torch.py:202
Function
check
Guard to check whether all parameters above have been defined.
experiments/config/helper.py:43
Function
check_hdf5
Check a file without loading data. :param filepath: path to file to read :type filepath: str :param key: key to read :type key:
common/utils.py:98
Function
choices
(sequence, k)
common/mask.py:6
Function
cifar10_test_images_file
Cifar10 test images. :return: filepath :rtype: str
common/paths.py:185
Function
cifar10_test_labels_file
Cifar10 test labels. :return: filepath :rtype: str
common/paths.py:207
Function
cifar10_train_images_file
Cifar10 train images. :return: filepath :rtype: str
common/paths.py:174
Function
cifar10_train_labels_file
Cifar10 train labels. :return: filepath :rtype: str
common/paths.py:196
Function
classification_error
Accuracy. :param logits: predicted classes :type logits: torch.autograd.Variable :param targets: target classes :type targets: t
common/torch.py:456
Function
classification_loss
Loss. :param logits: predicted classes :type logits: torch.autograd.Variable :param targets: target classes :type targets: torch
common/torch.py:488
Function
compute_adversarial_evaluations
Compute evaluation of perturbations/adversarial examples. :param config: config module as from module() :type config: module :param
experiments/eval/misc.py:276
Function
compute_clean_evaluations
Clean evaluation on probabilities. :param config: configuration as from module() :type config: module :param clean_probabilities: li
experiments/eval/misc.py:236
Function
compute_clean_probabilities
Compute probabilities of clean model on test loader. :param model_files: model files :type model_files: [str] :param testloader: tes
experiments/eval/misc.py:214
Function
concatenate
Basically a wrapper for numpy.concatenate, with the exception that the array itself is returned if its None or evaluates to False. :para
common/numpy.py:46
Method
confidence_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:407
Method
confidence_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:576
Method
confidence_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/clean_evaluation.py:242
Method
confidence_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/distal_evaluation.py:350
Method
confidence_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:417
Method
confidence_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:586
Method
confidence_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/clean_evaluation.py:252
Method
confidence_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/distal_evaluation.py:360
Method
confidence_at_995tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:437
Method
confidence_at_995tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:606
Method
confidence_at_995tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/clean_evaluation.py:272
Method
confidence_at_995tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/distal_evaluation.py:380
Method
confidence_at_99tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:427
Method
confidence_at_99tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:596
Method
confidence_at_99tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/distal_evaluation.py:370
Function
corrupted_main_latex_table
Corrupted main LaTeX table.
experiments/eval/misc.py:693
Function
corrupted_markdown_table
Generate corrupted markdown table.
experiments/eval/misc.py:412
Function
corrupted_supp_latex_table
Corrupted supplementary table.
experiments/eval/misc.py:741
Method
corrupted_test_error_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:647
Method
corrupted_test_error_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:657
Method
corrupted_test_error_at_995tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:677
Method
corrupted_test_error_at_99tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:667
Method
corrupted_test_error_curve
Test error for different confidence threshold. :return: test errors and confidences :rtype: numpy.ndarray, numpy.ndarray
common/eval/corrupted_evaluation.py:330
Function
cross_entropy_divergence
Loss. :param logits: predicted logits :type logits: torch.autograd.Variable :param targets: target distributions :type targets:
common/torch.py:560
Function
cube_l2_attack
A simple, but efficient black-box attack that just adds random steps of values in {-2eps, 0, 2eps} (i.e., the considered points are always corner
attacks/batch_cube2.py:141
Function
cube_linf_attack
A simple, but efficient black-box attack that just adds random steps of values in {-2eps, 0, 2eps} (i.e., the considered points are always corner
attacks/batch_cube2.py:65
Function
distal_main_latex_table
Distal main LaTeX table.
experiments/eval/misc.py:828
Function
distal_markdown_table
Generate distal markdown table.
experiments/eval/misc.py:483
Function
distal_supp_latex_table
Distal supplementary LaTeX table.
experiments/eval/misc.py:906
Function
elapsed
Time a function call. :param function: function to call :type function: callable
common/timer.py:35
Function
epoch_table
Create markdown table summarizing epochs of models and adversarial examples. :param model_epochs: model epochs as from load() :type mode
experiments/eval/misc.py:158
Function
estimate_size
Estimate tensor size. :param tensor: tensor or model :type tensor: numpy.ndarray, torch.tensor, torch.autograd.Variable or torch.nn.Modu
common/torch.py:72
Function
experiment_dir
Generate path to experiment directory. :param directory: directory :type directory: str
common/paths.py:328
Function
experiment_file
Generate path to experiment file. :param directory: directory :type directory: str :param name: name of file :type name: str
common/paths.py:339
Function
exponential_norm
Sample vectors uniformly by norm and direction separately. :param batch_size: how many vectors to sample :type batch_size: int :para
common/numpy.py:69
Function
exponential_transition
Exponential transition rule. :param perturbations: perturbations :type perturbations: torch.autograd.Variable :param norm: norm
common/torch.py:676
Function
find_incomplete_state_files
State file. :param model_file: base state file :type model_file: str :return: state file of ongoing training :rtype: str
common/experiments.py:51
Method
flush
Flush.
common/summary.py:930
Method
forward
Forward pass. :param input: input :type input: torch.autograd.Variable :return: output :rtype: torch.autogra
common/torch.py:731
Method
forward
Forward pass. :param input: input :type input: torch.autograd.Variable :return: output :rtype: torch.autogra
common/torch.py:762
Method
forward
Forward pass. :param input: input :type input: torch.autograd.Variable :return: output :rtype: torch.autogra
common/torch.py:793
Method
forward
Forward pass. :param input: input :type input: torch.autograd.Variable :return: output :rtype: torch.autogra
common/torch.py:818
Method
forward
Forward pass. :param input: input :type input: torch.autograd.Variable :return: output :rtype: torch.autogra
common/torch.py:856
Method
forward
(self, x)
examples/readme/train_confidence_calibrated.py:31
Method
forward
(self, x)
examples/readme/train_adversarial.py:33
Method
forward
(self, x)
examples/readme/train_normal.py:30
Method
forward
Forward pass. :param x: input :type x: torch.autograd.Variable :return: output :rtype: torch.autograd.Variab
models/resnet_block.py:56
Method
forward
(self, x)
models/preact_resnet_block.py:39
Method
forward
Forward pass, takes an image and outputs the predictions. :param image: input image :type image: torch.autograd.Variable
models/classifier.py:130
Method
forward
(self, x)
models/preact_resnet_bottleneck.py:42
Method
forward
(self, x)
models/wide_resnet_block.py:77
Method
fpr_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:567
Method
fpr_at_95tpr
FPR at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:736
Method
fpr_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/clean_evaluation.py:362
Method
fpr_at_95tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/distal_evaluation.py:470
Method
fpr_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/corrupted_evaluation.py:577
Method
fpr_at_98tpr
FPR at 95%TPR. :return: robust test error :rtype: float
common/eval/adversarial_evaluation.py:746
Method
fpr_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/clean_evaluation.py:372
Method
fpr_at_98tpr
Test error at 95%TPR. :return: robust test error :rtype: float
common/eval/distal_evaluation.py:480
← previous
next →
401–500 of 916, ranked by callers