SYMBOL INDEX (506 symbols across 33 files) FILE: examples/eval.py function layers (line 46) | def layers(model_size): function show_metrics (line 108) | def show_metrics(metric_values, bound_method='ibp'): function main (line 121) | def main(unused_args): FILE: examples/language/config.py function get_config (line 19) | def get_config(): FILE: examples/language/exhaustive_verification.py function load_synonyms (line 73) | def load_synonyms(synonym_filepath=None): function load_dataset (line 82) | def load_dataset(mode='validation', character_level=False): function expand_by_one_perturbation (line 112) | def expand_by_one_perturbation(original_tokenized_sentence, function find_up_to_depth_k_perturbations (line 138) | def find_up_to_depth_k_perturbations( function remove_duplicates (line 171) | def remove_duplicates(list_of_list_of_tokens): function verify_exhaustively (line 179) | def verify_exhaustively(sample, synonym_dict, sst_model, delta, function verify_dataset (line 258) | def verify_dataset(dataset, config_dict, model_location, synonym_dict, d... function example (line 300) | def example(synonym_dict, dataset, k=2): function main (line 332) | def main(args): FILE: examples/language/interactive_example.py class InteractiveSentimentPredictor (line 36) | class InteractiveSentimentPredictor(object): method __init__ (line 39) | def __init__(self, config_dict, model_location, max_padded_length=0, method batch_predict_sentiment (line 55) | def batch_predict_sentiment(self, list_of_sentences, is_tokenised=True): method predict_sentiment (line 117) | def predict_sentiment(self, sentence, tokenised=False): FILE: examples/language/models.py function _max_pool_1d (line 25) | def _max_pool_1d(x, pool_size=2, name='max_pool_1d'): class SentenceRepresenterConv (line 35) | class SentenceRepresenterConv(snt.AbstractModule): method __init__ (line 38) | def __init__(self, method _build (line 48) | def _build(self, padded_word_embeddings, length): FILE: examples/language/robust_model.py function _pad_fixed (line 50) | def _pad_fixed(x, axis, padded_length): class GeneratedDataset (line 65) | class GeneratedDataset(snt.AbstractModule): method __init__ (line 68) | def __init__(self, data_gen, batch_size, mode='train', method get_row_lengths (line 80) | def get_row_lengths(self, sparse_tensor_input): method _build (line 87) | def _build(self): method num_examples (line 109) | def num_examples(self): function parse (line 113) | def parse(data_dict): class RobustModel (line 132) | class RobustModel(snt.AbstractModule): method __init__ (line 135) | def __init__(self, method add_representer (line 158) | def add_representer(self, vocab_filename, padded_token=None): method add_dataset (line 180) | def add_dataset(self): method get_representation (line 198) | def get_representation(self, tokens, num_tokens): method add_representation (line 204) | def add_representation(self, minibatch): method add_train_ops (line 218) | def add_train_ops(self, method create_perturbation_ops (line 251) | def create_perturbation_ops(self, minibatch, synonym_values, vocab_tab... method _add_optimize_op (line 341) | def _add_optimize_op(self, loss): method embed_dataset (line 353) | def embed_dataset(self, minibatch, vocab_table): method compute_mask_vertices (line 368) | def compute_mask_vertices(self, data_batch, perturbation): method preprocess_databatch (line 395) | def preprocess_databatch(self, minibatch, vocab_table, perturbation): method add_verifiable_objective (line 400) | def add_verifiable_objective(self, method run_classification (line 430) | def run_classification(self, inputs, labels, length): method compute_verifiable_loss (line 436) | def compute_verifiable_loss(self, verifiable_obj, labels): method compute_verifiable_verified (line 469) | def compute_verifiable_verified(self, verifiable_obj): method run_prediction (line 475) | def run_prediction(self, inputs, length): method sentiment_accuracy_op (line 480) | def sentiment_accuracy_op(self, minibatch): method add_dev_eval_ops (line 496) | def add_dev_eval_ops(self, minibatch): method _build (line 507) | def _build(self): method _build_graph_with_datasets (line 530) | def _build_graph_with_datasets(self, method _lines_from_file (line 696) | def _lines_from_file(self, filename): function verifiable_objective (line 701) | def verifiable_objective(network, labels, margin=0.): function targeted_objective (line 746) | def targeted_objective(final_w, final_b, labels): function filter_correct_class (line 771) | def filter_correct_class(verifiable_obj, num_classes, labels, margin): FILE: examples/language/robust_train.py function load_synonyms (line 64) | def load_synonyms(synonym_filepath=None): function construct_synonyms (line 71) | def construct_synonyms(synonym_filepath): function linear_schedule (line 83) | def linear_schedule(step, init_step, final_step, init_value, final_value): function config_train_summary (line 94) | def config_train_summary(task, train_accuracy, loss): function write_tf_summary (line 113) | def write_tf_summary(writer, step, tag, value): function train (line 119) | def train(config_dict, synonym_filepath, function analysis (line 291) | def analysis(config_dict, synonym_filepath, function main (line 392) | def main(_): FILE: examples/language/utils.py function get_padded_embeddings (line 29) | def get_padded_embeddings(embeddings, function get_padded_indexes (line 128) | def get_padded_indexes(vocabulary_table, class EmbedAndPad (line 166) | class EmbedAndPad(snt.AbstractModule): method __init__ (line 174) | def __init__(self, method _build (line 206) | def _build(self, tokens): method vocab_table (line 212) | def vocab_table(self): method vocab_size (line 216) | def vocab_size(self): function get_accuracy (line 220) | def get_accuracy(logits, labels): function get_num_correct_predictions (line 225) | def get_num_correct_predictions(logits, labels): function get_merged_vocabulary_file (line 233) | def get_merged_vocabulary_file(vocabularies, padded_token=None): FILE: examples/train.py function show_metrics (line 71) | def show_metrics(step_value, metric_values, loss_value=None): function layers (line 81) | def layers(model_size): function main (line 127) | def main(unused_args): FILE: interval_bound_propagation/src/attacks.py class UnrolledOptimizer (line 33) | class UnrolledOptimizer(object): method __init__ (line 36) | def __init__(self, colocate_gradients_with_ops=False): method minimize (line 40) | def minimize(self, loss, x, optim_state): method init_state (line 58) | def init_state(self, x): class UnrolledGradientDescent (line 69) | class UnrolledGradientDescent(UnrolledOptimizer): method __init__ (line 74) | def __init__(self, lr=.1, lr_fn=None, fgsm=False, method init_state (line 81) | def init_state(self, unused_x): method minimize (line 84) | def minimize(self, loss, x, optim_state): method gradients (line 96) | def gradients(self, loss, x): class UnrolledFGSMDescent (line 102) | class UnrolledFGSMDescent(UnrolledGradientDescent): method __init__ (line 105) | def __init__(self, lr=.1, lr_fn=None, class UnrolledAdam (line 111) | class UnrolledAdam(UnrolledOptimizer): method __init__ (line 116) | def __init__(self, lr=0.1, lr_fn=None, beta1=0.9, beta2=0.999, epsilon... method init_state (line 125) | def init_state(self, x): method _apply_gradients (line 131) | def _apply_gradients(self, grads, x, optim_state): method minimize (line 151) | def minimize(self, loss, x, optim_state): method gradients (line 155) | def gradients(self, loss, x): function _spsa_gradients (line 160) | def _spsa_gradients(loss_fn, x, delta=0.01, num_samples=16, num_iteratio... class UnrolledSPSA (line 232) | class UnrolledSPSA(object): class UnrolledSPSAGradientDescent (line 236) | class UnrolledSPSAGradientDescent(UnrolledGradientDescent, UnrolledSPSA): method __init__ (line 243) | def __init__(self, lr=0.1, lr_fn=None, fgsm=False, method gradients (line 255) | def gradients(self, loss, x): class UnrolledSPSAFGSMDescent (line 261) | class UnrolledSPSAFGSMDescent(UnrolledSPSAGradientDescent): method __init__ (line 264) | def __init__(self, lr=.1, lr_fn=None, class UnrolledSPSAAdam (line 272) | class UnrolledSPSAAdam(UnrolledAdam, UnrolledSPSA): method __init__ (line 279) | def __init__(self, lr=0.1, lr_fn=None, beta1=0.9, beta2=0.999, epsilon... method gradients (line 291) | def gradients(self, loss, x): function _is_spsa_optimizer (line 296) | def _is_spsa_optimizer(cls): function wrap_optimizer (line 300) | def wrap_optimizer(cls, **default_kwargs): function _project_perturbation (line 312) | def _project_perturbation(perturbation, epsilon, input_image, image_boun... function pgd_attack (line 320) | def pgd_attack(loss_fn, input_image, epsilon, num_steps, class Attack (line 384) | class Attack(snt.AbstractModule): method __init__ (line 387) | def __init__(self, predictor, specification, name, predictor_kwargs=No... method _eval_fn (line 398) | def _eval_fn(self, x, mode='intermediate'): method _build (line 414) | def _build(self, inputs, labels): method logits (line 418) | def logits(self): method attack (line 422) | def attack(self): method success (line 426) | def success(self): method force_mode (line 429) | def force_mode(self, mode): method target_class (line 434) | def target_class(self): method target_class (line 439) | def target_class(self, t): class PGDAttack (line 444) | class PGDAttack(Attack): method __init__ (line 447) | def __init__(self, predictor, specification, epsilon, lr=.1, lr_fn=None, method prepare_inputs (line 465) | def prepare_inputs(self, inputs): method prepare_labels (line 479) | def prepare_labels(self, labels): method find_worst_attack (line 483) | def find_worst_attack(self, objective_fn, adversarial_input, batch_size, function _maximize_margin (line 496) | def _maximize_margin(bounds): function _any_greater (line 501) | def _any_greater(bounds): function _maximize_topk_hinge_margin (line 507) | def _maximize_topk_hinge_margin(bounds, k=5, margin=.1): function _topk_greater (line 513) | def _topk_greater(bounds, k=5): class UntargetedPGDAttack (line 519) | class UntargetedPGDAttack(PGDAttack): method __init__ (line 522) | def __init__(self, predictor, specification, epsilon, lr=.1, lr_fn=None, method _build (line 535) | def _build(self, inputs, labels): method logits (line 591) | def logits(self): method attack (line 596) | def attack(self): method success (line 601) | def success(self): method adapt (line 605) | def adapt(self, original_inputs, adversarial_inputs, labels): class UntargetedTop5PGDAttack (line 610) | class UntargetedTop5PGDAttack(UntargetedPGDAttack): method __init__ (line 613) | def __init__(self, predictor, specification, epsilon, lr=.1, lr_fn=None, class UntargetedAdaptivePGDAttack (line 627) | class UntargetedAdaptivePGDAttack(UntargetedPGDAttack): method adapt (line 630) | def adapt(self, original_inputs, adversarial_inputs, labels): class MultiTargetedPGDAttack (line 666) | class MultiTargetedPGDAttack(PGDAttack): method __init__ (line 669) | def __init__(self, predictor, specification, epsilon, lr=.1, lr_fn=None, method _build (line 685) | def _build(self, inputs, labels): method logits (line 749) | def logits(self): method attack (line 754) | def attack(self): method success (line 759) | def success(self): class MemoryEfficientMultiTargetedPGDAttack (line 764) | class MemoryEfficientMultiTargetedPGDAttack(PGDAttack): method __init__ (line 767) | def __init__(self, predictor, specification, epsilon, lr=.1, lr_fn=None, method _build (line 783) | def _build(self, inputs, labels): method logits (line 864) | def logits(self): method attack (line 869) | def attack(self): method success (line 874) | def success(self): class RestartedAttack (line 879) | class RestartedAttack(Attack): method __init__ (line 882) | def __init__(self, inner_attack, num_restarts=1): method _build (line 893) | def _build(self, inputs, labels): method logits (line 920) | def logits(self): method attack (line 925) | def attack(self): method success (line 930) | def success(self): FILE: interval_bound_propagation/src/bounds.py class AbstractBounds (line 31) | class AbstractBounds(object): method __init__ (line 34) | def __init__(self): method convert (line 39) | def convert(cls, bounds): method shape (line 43) | def shape(self): method concretize (line 46) | def concretize(self): method _raise_not_implemented (line 49) | def _raise_not_implemented(self, name): method apply_linear (line 54) | def apply_linear(self, wrapper, w, b): # pylint: disable=unused-argument method apply_conv1d (line 57) | def apply_conv1d(self, wrapper, w, b, padding, stride): # pylint: dis... method apply_conv2d (line 60) | def apply_conv2d(self, wrapper, w, b, padding, strides): # pylint: di... method apply_increasing_monotonic_fn (line 63) | def apply_increasing_monotonic_fn(self, wrapper, fn, *args, **paramete... method apply_piecewise_monotonic_fn (line 66) | def apply_piecewise_monotonic_fn(self, wrapper, fn, boundaries, *args)... method apply_batch_norm (line 69) | def apply_batch_norm(self, wrapper, mean, variance, scale, bias, epsil... method apply_batch_reshape (line 72) | def apply_batch_reshape(self, wrapper, shape): # pylint: disable=unus... method apply_softmax (line 75) | def apply_softmax(self, wrapper): # pylint: disable=unused-argument method update_cache_op (line 79) | def update_cache_op(self): method enable_caching (line 85) | def enable_caching(self): method _set_up_cache (line 91) | def _set_up_cache(self): method _cache_with_update_op (line 99) | def _cache_with_update_op(self, tensor): class IntervalBounds (line 118) | class IntervalBounds(AbstractBounds): method __init__ (line 121) | def __init__(self, lower, upper): method lower (line 127) | def lower(self): method upper (line 131) | def upper(self): method shape (line 135) | def shape(self): method __iter__ (line 138) | def __iter__(self): method convert (line 143) | def convert(cls, bounds): method apply_linear (line 152) | def apply_linear(self, wrapper, w, b): method apply_conv1d (line 155) | def apply_conv1d(self, wrapper, w, b, padding, stride): method apply_conv2d (line 158) | def apply_conv2d(self, wrapper, w, b, padding, strides): method _affine (line 162) | def _affine(self, w, b, fn, **kwargs): method apply_increasing_monotonic_fn (line 171) | def apply_increasing_monotonic_fn(self, wrapper, fn, *args, **paramete... method apply_piecewise_monotonic_fn (line 176) | def apply_piecewise_monotonic_fn(self, wrapper, fn, boundaries, *args): method apply_batch_norm (line 193) | def apply_batch_norm(self, wrapper, mean, variance, scale, bias, epsil... method apply_batch_reshape (line 212) | def apply_batch_reshape(self, wrapper, shape): method apply_softmax (line 216) | def apply_softmax(self, wrapper): method _set_up_cache (line 227) | def _set_up_cache(self): FILE: interval_bound_propagation/src/crown.py class BackwardBounds (line 35) | class BackwardBounds(bounds.AbstractBounds): method __init__ (line 38) | def __init__(self, lower, upper): method lower (line 47) | def lower(self): method upper (line 51) | def upper(self): method shape (line 55) | def shape(self): method concretize (line 58) | def concretize(self): method convert (line 82) | def convert(cls, other_bounds): method apply_linear (line 88) | def apply_linear(self, wrapper, w, b): method apply_conv2d (line 102) | def apply_conv2d(self, wrapper, w, b, padding, strides): method _get_monotonic_fn_bound (line 139) | def _get_monotonic_fn_bound(self, wrapper, fn): method apply_increasing_monotonic_fn (line 169) | def apply_increasing_monotonic_fn(self, wrapper, fn, *args): method apply_batch_reshape (line 193) | def apply_batch_reshape(self, wrapper, shape): method _reshape_to_rank (line 207) | def _reshape_to_rank(a, rank): method _matvec (line 213) | def _matvec(a, b): class Losses (line 249) | class Losses(loss.Losses): method __init__ (line 252) | def __init__(self, predictor, specification=None, pgd_attack=None, method _get_specification_bounds (line 265) | def _get_specification_bounds(self): method scalar_metrics (line 301) | def scalar_metrics(self): method scalar_losses (line 310) | def scalar_losses(self): class VerifiableModelWrapper (line 317) | class VerifiableModelWrapper(model.VerifiableModelWrapper): method _propagate (line 320) | def _propagate(self, current_module, current_bounds): method propagate_bound_backward (line 337) | def propagate_bound_backward(self, initial_bound, function create_initial_backward_bounds (line 371) | def create_initial_backward_bounds(spec, modules): function create_classification_losses (line 391) | def create_classification_losses( FILE: interval_bound_propagation/src/fastlin.py class SymbolicBounds (line 50) | class SymbolicBounds(basic_bounds.AbstractBounds): method __init__ (line 53) | def __init__(self, lower, upper): method lower (line 61) | def lower(self): method upper (line 65) | def upper(self): method shape (line 69) | def shape(self): method concretize (line 72) | def concretize(self): method with_priors (line 86) | def with_priors(self, existing_bounds): method convert (line 94) | def convert(cls, bounds): method apply_linear (line 107) | def apply_linear(self, wrapper, w, b): method apply_conv1d (line 122) | def apply_conv1d(self, wrapper, w, b, padding, stride): method apply_conv2d (line 136) | def apply_conv2d(self, wrapper, w, b, padding, strides): method apply_increasing_monotonic_fn (line 150) | def apply_increasing_monotonic_fn(self, wrapper, fn, *args, **paramete... method apply_batch_reshape (line 181) | def apply_batch_reshape(self, wrapper, shape): method _add_bias (line 188) | def _add_bias(expr, b): method _add_expression (line 196) | def _add_expression(expr_a, expr_b): method _scale_expression (line 202) | def _scale_expression(expr, w): method _conv1d_expression (line 209) | def _conv1d_expression(expr, w, padding, stride): method _conv2d_expression (line 221) | def _conv2d_expression(expr, w, padding, strides): method _batch_reshape_expression (line 233) | def _batch_reshape_expression(expr, shape): method _concretize_bounds (line 239) | def _concretize_bounds(lower, upper): method _initial_symbolic_bounds (line 259) | def _initial_symbolic_bounds(lb, ub): class RelativeSymbolicBounds (line 276) | class RelativeSymbolicBounds(SymbolicBounds): method __init__ (line 279) | def __init__(self, lower_offset, upper_offset, nominal): method concretize (line 283) | def concretize(self): method convert (line 299) | def convert(cls, bounds): method apply_linear (line 315) | def apply_linear(self, wrapper, w, b): method apply_conv1d (line 327) | def apply_conv1d(self, wrapper, w, b, padding, stride): method apply_conv2d (line 340) | def apply_conv2d(self, wrapper, w, b, padding, strides): method apply_increasing_monotonic_fn (line 353) | def apply_increasing_monotonic_fn(self, wrapper, fn, *args, **paramete... method apply_batch_reshape (line 397) | def apply_batch_reshape(self, wrapper, shape): FILE: interval_bound_propagation/src/layer_utils.py function conv_output_shape (line 27) | def conv_output_shape(input_shape, w, padding, strides): function materialise_conv (line 59) | def materialise_conv(w, b, input_shape, padding, strides): function _materialise_conv2d (line 90) | def _materialise_conv2d(w, b, input_height, input_width, padding, strides): function _materialise_conv1d (line 145) | def _materialise_conv1d(w, b, input_length, padding, stride): function decode_batchnorm (line 197) | def decode_batchnorm(batchnorm_module): function combine_with_batchnorm (line 249) | def combine_with_batchnorm(w, b, batchnorm_module): FILE: interval_bound_propagation/src/layers.py class BatchNorm (line 34) | class BatchNorm(snt.BatchNorm): method __init__ (line 37) | def __init__(self, axis=None, offset=True, scale=False, method _build_statistics (line 48) | def _build_statistics(self, input_batch, axis, use_batch_stats, stat_d... method _build (line 54) | def _build(self, input_batch, is_training=True, test_local_stats=False, method scale (line 86) | def scale(self): method bias (line 91) | def bias(self): method mean (line 96) | def mean(self): method variance (line 101) | def variance(self): method epsilon (line 106) | def epsilon(self): class ImageNorm (line 111) | class ImageNorm(snt.AbstractModule): method __init__ (line 114) | def __init__(self, mean, std, name='image_norm'): method _build (line 131) | def _build(self, inputs): method scale (line 135) | def scale(self): method offset (line 139) | def offset(self): method apply (line 143) | def apply(self, inputs): FILE: interval_bound_propagation/src/loss.py class Losses (line 44) | class Losses(snt.AbstractModule): method __init__ (line 47) | def __init__(self, predictor, specification=None, pgd_attack=None, method _build (line 84) | def _build(self, labels): method _build_nominal_loss (line 89) | def _build_nominal_loss(self, labels): method _get_specification_bounds (line 111) | def _get_specification_bounds(self): method _build_verified_loss (line 120) | def _build_verified_loss(self, labels): method _build_attack_loss (line 169) | def _build_attack_loss(self, labels): method scalar_metrics (line 194) | def scalar_metrics(self): method scalar_losses (line 202) | def scalar_losses(self): FILE: interval_bound_propagation/src/model.py class VerifiableModelWrapper (line 59) | class VerifiableModelWrapper(snt.AbstractModule): method __init__ (line 62) | def __init__(self, net_builder, name='verifiable_predictor'): method wrapped_network (line 75) | def wrapped_network(self): method output_size (line 79) | def output_size(self): method logits (line 84) | def logits(self): method inputs (line 89) | def inputs(self): method input_wrappers (line 94) | def input_wrappers(self): method modules (line 99) | def modules(self): method dependencies (line 103) | def dependencies(self, module): method output_module (line 108) | def output_module(self): method fanout_of (line 112) | def fanout_of(self, node): method _build (line 125) | def _build(self, *z0, **kwargs): method _observer (line 178) | def _observer(self, subgraph): method _inputs_for_observed_module (line 194) | def _inputs_for_observed_module(self, subgraph): method _wrapper_for_observed_module (line 222) | def _wrapper_for_observed_module(self, subgraph): method _backtrack (line 251) | def _backtrack(self, node, max_depth=100): method _wrap_node (line 259) | def _wrap_node(self, node, **kwargs): method _add_module (line 458) | def _add_module(self, wrapper, node, *input_nodes, **kwargs): method propagate_bounds (line 475) | def propagate_bounds(self, *input_bounds): class StandardModelWrapper (line 506) | class StandardModelWrapper(snt.AbstractModule): method __init__ (line 509) | def __init__(self, net_builder, name='verifiable_predictor'): method wrapped_network (line 525) | def wrapped_network(self): method output_size (line 529) | def output_size(self): method logits (line 534) | def logits(self): method inputs (line 539) | def inputs(self): method modules (line 544) | def modules(self): method propagate_bounds (line 548) | def propagate_bounds(self, *input_bounds): method _build (line 552) | def _build(self, *z0, **kwargs): class DNN (line 583) | class DNN(snt.AbstractModule): method __init__ (line 586) | def __init__(self, num_classes, layer_types, l2_regularization_scale=0., method _build (line 613) | def _build(self, z0, is_training=True, test_local_stats=False, reuse=F... function _create_conv2d_initializer (line 675) | def _create_conv2d_initializer( function _create_linear_initializer (line 684) | def _create_linear_initializer(input_size, output_size, dtype=tf.float32... FILE: interval_bound_propagation/src/relative_bounds.py class RelativeIntervalBounds (line 27) | class RelativeIntervalBounds(basic_bounds.AbstractBounds): method __init__ (line 30) | def __init__(self, lower_offset, upper_offset, nominal): method lower_offset (line 37) | def lower_offset(self): method upper_offset (line 42) | def upper_offset(self): method nominal (line 47) | def nominal(self): method lower (line 51) | def lower(self): method upper (line 56) | def upper(self): method shape (line 61) | def shape(self): method convert (line 65) | def convert(cls, bounds): method apply_batch_reshape (line 74) | def apply_batch_reshape(self, wrapper, shape): method apply_linear (line 90) | def apply_linear(self, wrapper, w, b): method apply_conv1d (line 116) | def apply_conv1d(self, wrapper, w, b, padding, stride): method apply_conv2d (line 149) | def apply_conv2d(self, wrapper, w, b, padding, strides): method apply_increasing_monotonic_fn (line 182) | def apply_increasing_monotonic_fn(self, wrapper, fn, *args, **paramete... method apply_batch_norm (line 223) | def apply_batch_norm(self, wrapper, mean, variance, scale, bias, epsil... method _set_up_cache (line 251) | def _set_up_cache(self): function _maxpool_bounds (line 259) | def _maxpool_bounds(module, kernel_shape, strides, lb_in, ub_in, function _activation_bounds (line 301) | def _activation_bounds(nl_fun, lb_in, ub_in, nominal_in, parameters=None): FILE: interval_bound_propagation/src/simplex_bounds.py class SimplexBounds (line 28) | class SimplexBounds(basic_bounds.AbstractBounds): method __init__ (line 31) | def __init__(self, vertices, nominal, r): method vertices (line 51) | def vertices(self): method nominal (line 55) | def nominal(self): method r (line 59) | def r(self): method shape (line 63) | def shape(self): method convert (line 67) | def convert(cls, bounds): method apply_batch_reshape (line 73) | def apply_batch_reshape(self, wrapper, shape): method apply_linear (line 83) | def apply_linear(self, wrapper, w, b): method apply_conv1d (line 95) | def apply_conv1d(self, wrapper, w, b, padding, stride): method apply_conv2d (line 123) | def apply_conv2d(self, wrapper, w, b, padding, strides): method apply_increasing_monotonic_fn (line 150) | def apply_increasing_monotonic_fn(self, wrapper, fn, *args, **paramete... function _simplex_bounds (line 172) | def _simplex_bounds(mapped_vertices, mapped_centres, r, axis): FILE: interval_bound_propagation/src/specification.py class Specification (line 34) | class Specification(snt.AbstractModule): method __init__ (line 37) | def __init__(self, name, collapse=True): method _build (line 42) | def _build(self, modules): method evaluate (line 46) | def evaluate(self, logits): method num_specifications (line 64) | def num_specifications(self): method collapse (line 68) | def collapse(self): class LinearSpecification (line 72) | class LinearSpecification(Specification): method __init__ (line 75) | def __init__(self, c, d=None, prune_irrelevant=True, collapse=True): method _build (line 97) | def _build(self, modules): method evaluate (line 129) | def evaluate(self, logits): method num_specifications (line 142) | def num_specifications(self): method c (line 146) | def c(self): method d (line 150) | def d(self): class ClassificationSpecification (line 154) | class ClassificationSpecification(Specification): method __init__ (line 161) | def __init__(self, label, num_classes, collapse=True): method _build (line 174) | def _build(self, modules): method evaluate (line 207) | def evaluate(self, logits): method num_specifications (line 239) | def num_specifications(self): method correct_idx (line 243) | def correct_idx(self): method wrong_idx (line 247) | def wrong_idx(self): method _build_indices (line 250) | def _build_indices(self, label, indices): class TargetedClassificationSpecification (line 261) | class TargetedClassificationSpecification(ClassificationSpecification): method __init__ (line 264) | def __init__(self, label, num_classes, target_class, collapse=True): method target_class (line 281) | def target_class(self): method num_specifications (line 286) | def num_specifications(self): class RandomClassificationSpecification (line 290) | class RandomClassificationSpecification(TargetedClassificationSpecificat... method __init__ (line 293) | def __init__(self, label, num_classes, num_targets=1, seed=None, class LeastLikelyClassificationSpecification (line 306) | class LeastLikelyClassificationSpecification( method __init__ (line 310) | def __init__(self, label, num_classes, logits, num_targets=1, collapse... FILE: interval_bound_propagation/src/utils.py function build_dataset (line 39) | def build_dataset(raw_data, batch_size=50, sequential=True): function randomize (line 52) | def randomize(images, init_shape, expand_shape=None, crop_shape=None, function linear_schedule (line 73) | def linear_schedule(step, init_step, final_step, init_value, final_value): function smooth_schedule (line 84) | def smooth_schedule(step, init_step, final_step, init_value, final_value, function build_loss_schedule (line 111) | def build_loss_schedule(step, warmup_steps, rampup_steps, init, final, function add_image_normalization (line 143) | def add_image_normalization(model, mean, std): function create_specification (line 149) | def create_specification(label, num_classes, logits, function create_classification_losses (line 170) | def create_classification_losses( function get_attack_builder (line 298) | def get_attack_builder(logits, label, name='UntargetedPGDAttack', function create_attack (line 461) | def create_attack(attack_config, predictor, label, epsilon, function parse_learning_rate (line 531) | def parse_learning_rate(step, learning_rate): function _change_parameters (line 593) | def _change_parameters(attack_cls, **updated_kwargs): function _get_random_class (line 600) | def _get_random_class(label, num_classes, seed=None): function _get_least_likely_class (line 608) | def _get_least_likely_class(label, num_classes, logits): function _maximize_cross_entropy (line 616) | def _maximize_cross_entropy(specification_bounds): function _minimize_cross_entropy (line 632) | def _minimize_cross_entropy(specification_bounds): function _maximize_margin (line 636) | def _maximize_margin(specification_bounds): function _minimize_margin (line 641) | def _minimize_margin(specification_bounds): function _all_smaller (line 645) | def _all_smaller(specification_bounds): function _get_projection (line 650) | def _get_projection(p): FILE: interval_bound_propagation/src/verifiable_wrapper.py class VerifiableWrapper (line 33) | class VerifiableWrapper(object): method __init__ (line 36) | def __init__(self, module): method input_bounds (line 42) | def input_bounds(self): method output_bounds (line 47) | def output_bounds(self): method module (line 51) | def module(self): method __str__ (line 54) | def __str__(self): method propagate_bounds (line 65) | def propagate_bounds(self, *input_bounds): method _propagate_through (line 78) | def _propagate_through(self, module, *input_bounds): class ModelInputWrapper (line 90) | class ModelInputWrapper(object): method __init__ (line 93) | def __init__(self, index): method index (line 99) | def index(self): method output_bounds (line 103) | def output_bounds(self): method output_bounds (line 107) | def output_bounds(self, bounds): method __str__ (line 110) | def __str__(self): class ConstWrapper (line 114) | class ConstWrapper(VerifiableWrapper): method _propagate_through (line 117) | def _propagate_through(self, module): class LinearFCWrapper (line 122) | class LinearFCWrapper(VerifiableWrapper): method __init__ (line 125) | def __init__(self, module): method _propagate_through (line 130) | def _propagate_through(self, module, input_bounds): class LinearConvWrapper (line 136) | class LinearConvWrapper(VerifiableWrapper): class LinearConv1dWrapper (line 140) | class LinearConv1dWrapper(LinearConvWrapper): method __init__ (line 143) | def __init__(self, module): method _propagate_through (line 149) | def _propagate_through(self, module, input_bounds): class LinearConv2dWrapper (line 157) | class LinearConv2dWrapper(LinearConvWrapper): method __init__ (line 160) | def __init__(self, module): method _propagate_through (line 166) | def _propagate_through(self, module, input_bounds): class IncreasingMonotonicWrapper (line 174) | class IncreasingMonotonicWrapper(VerifiableWrapper): method __init__ (line 177) | def __init__(self, module, **parameters): method parameters (line 182) | def parameters(self): method _propagate_through (line 185) | def _propagate_through(self, module, main_bounds, *other_input_bounds): class SoftmaxWrapper (line 191) | class SoftmaxWrapper(VerifiableWrapper): method __init__ (line 194) | def __init__(self): method _propagate_through (line 197) | def _propagate_through(self, module, input_bounds): class PiecewiseMonotonicWrapper (line 201) | class PiecewiseMonotonicWrapper(VerifiableWrapper): method __init__ (line 204) | def __init__(self, module, boundaries=()): method boundaries (line 209) | def boundaries(self): method _propagate_through (line 212) | def _propagate_through(self, module, main_bounds, *other_input_bounds): class ImageNormWrapper (line 218) | class ImageNormWrapper(IncreasingMonotonicWrapper): method __init__ (line 221) | def __init__(self, module): method inner_module (line 228) | def inner_module(self): class BatchNormWrapper (line 232) | class BatchNormWrapper(VerifiableWrapper): method __init__ (line 235) | def __init__(self, module): method _propagate_through (line 241) | def _propagate_through(self, module, input_bounds): class BatchReshapeWrapper (line 275) | class BatchReshapeWrapper(VerifiableWrapper): method __init__ (line 278) | def __init__(self, module, shape): method shape (line 286) | def shape(self): method _propagate_through (line 289) | def _propagate_through(self, module, input_bounds): class BatchFlattenWrapper (line 293) | class BatchFlattenWrapper(BatchReshapeWrapper): method __init__ (line 296) | def __init__(self, module): FILE: interval_bound_propagation/tests/attacks_test.py class MockWithIsTraining (line 29) | class MockWithIsTraining(object): method __init__ (line 32) | def __init__(self, module, test): method __call__ (line 36) | def __call__(self, z0, is_training=False): class MockWithoutIsTraining (line 42) | class MockWithoutIsTraining(object): method __init__ (line 45) | def __init__(self, module, test): method __call__ (line 49) | def __call__(self, z0): class AttacksTest (line 53) | class AttacksTest(parameterized.TestCase, tf.test.TestCase): method testEndToEnd (line 72) | def testEndToEnd(self, predictor_cls, attack_cls, optimizer_cls, epsilon, FILE: interval_bound_propagation/tests/bounds_test.py class IntervalBoundsTest (line 29) | class IntervalBoundsTest(parameterized.TestCase, tf.test.TestCase): method testFCIntervalBounds (line 31) | def testFCIntervalBounds(self): method testConv1dIntervalBounds (line 49) | def testConv1dIntervalBounds(self): method testConv2dIntervalBounds (line 74) | def testConv2dIntervalBounds(self): method testReluIntervalBounds (line 99) | def testReluIntervalBounds(self): method testMulIntervalBounds (line 110) | def testMulIntervalBounds(self): method testSubIntervalBounds (line 121) | def testSubIntervalBounds(self): method testSoftmaxIntervalBounds (line 137) | def testSoftmaxIntervalBounds(self, axis, expected_outputs): method testBatchNormIntervalBounds (line 152) | def testBatchNormIntervalBounds(self): method testCaching (line 173) | def testCaching(self): FILE: interval_bound_propagation/tests/crown_test.py function _generate_identity_spec (line 28) | def _generate_identity_spec(modules, shape, dimension=1): class CROWNBoundsTest (line 35) | class CROWNBoundsTest(tf.test.TestCase): method testFCBackwardBounds (line 37) | def testFCBackwardBounds(self): method testConv2dBackwardBounds (line 67) | def testConv2dBackwardBounds(self): method testReluBackwardBounds (line 95) | def testReluBackwardBounds(self): FILE: interval_bound_propagation/tests/fastlin_test.py class SymbolicBoundsTest (line 29) | class SymbolicBoundsTest(parameterized.TestCase, tf.test.TestCase): method testConvertSymbolicBounds (line 31) | def testConvertSymbolicBounds(self): method testFCSymbolicBounds (line 41) | def testFCSymbolicBounds(self): method testConv2dSymbolicBounds (line 70) | def testConv2dSymbolicBounds(self): method testConv1dSymbolicBounds (line 97) | def testConv1dSymbolicBounds(self): method testReluSymbolicBounds (line 124) | def testReluSymbolicBounds(self): FILE: interval_bound_propagation/tests/layers_test.py function _get_inputs (line 27) | def _get_inputs(dtype=tf.float32): class LayersTest (line 34) | class LayersTest(tf.test.TestCase): method assertBetween (line 36) | def assertBetween(self, value, minv, maxv): method testBatchNormUpdateImproveStatistics (line 42) | def testBatchNormUpdateImproveStatistics(self): method testImageNorm (line 62) | def testImageNorm(self): FILE: interval_bound_propagation/tests/loss_test.py class FixedNN (line 27) | class FixedNN(snt.AbstractModule): method _build (line 29) | def _build(self, z0, is_training=False): class LossTest (line 37) | class LossTest(tf.test.TestCase): method testEndToEnd (line 39) | def testEndToEnd(self): FILE: interval_bound_propagation/tests/model_test.py function _build_model (line 30) | def _build_model(): class ModelTest (line 40) | class ModelTest(parameterized.TestCase, tf.test.TestCase): method testDNN (line 42) | def testDNN(self): method _propagation_test (line 60) | def _propagation_test(self, wrapper, inputs, outputs): method testVerifiableModelWrapperDNN (line 69) | def testVerifiableModelWrapperDNN(self): method testVerifiableModelWrapperResnet (line 103) | def testVerifiableModelWrapperResnet(self): method testVerifiableModelWrapperPool (line 125) | def testVerifiableModelWrapperPool(self): method testVerifiableModelWrapperConcat (line 139) | def testVerifiableModelWrapperConcat(self): method testVerifiableModelWrapperExpandAndSqueeze (line 152) | def testVerifiableModelWrapperExpandAndSqueeze(self): method testVerifiableModelWrapperSimple (line 175) | def testVerifiableModelWrapperSimple(self, fn, expected_modules): method testPointlessReshape (line 188) | def testPointlessReshape(self): method testLeakyRelu (line 204) | def testLeakyRelu(self): method testMultipleInputs (line 219) | def testMultipleInputs(self): FILE: interval_bound_propagation/tests/relative_bounds_test.py class RelativeIntervalBoundsTest (line 30) | class RelativeIntervalBoundsTest(tf.test.TestCase, parameterized.TestCase): method test_linear_bounds_shape (line 34) | def test_linear_bounds_shape(self, dtype): method test_linear_bounds (line 56) | def test_linear_bounds(self, dtype, tol): method test_conv2d_bounds_shape (line 78) | def test_conv2d_bounds_shape(self, dtype): method test_conv2d_bounds (line 116) | def test_conv2d_bounds(self, dtype, tol): method test_conv1d_bounds_shape (line 157) | def test_conv1d_bounds_shape(self, dtype): method test_conv1d_bounds (line 192) | def test_conv1d_bounds(self, dtype, tol): method test_batchnorm_bounds (line 236) | def test_batchnorm_bounds(self, batchnorm_class, dtype, tol, is_traini... function _materialised_conv_bounds (line 294) | def _materialised_conv_bounds(w, b, padding, strides, bounds_in): FILE: interval_bound_propagation/tests/simplex_bounds_test.py class SimplexBoundsTest (line 29) | class SimplexBoundsTest(tf.test.TestCase, parameterized.TestCase): method test_linear_simplex_bounds_shape (line 33) | def test_linear_simplex_bounds_shape(self, dtype): method test_linear_bounds_on_embedding_layer (line 56) | def test_linear_bounds_on_embedding_layer(self, dtype, tol): method test_conv1d_simplex_bounds_shape (line 81) | def test_conv1d_simplex_bounds_shape(self, dtype): method test_conv1d_simplex_bounds (line 116) | def test_conv1d_simplex_bounds(self, dtype, tol): function _materialised_conv_simplex_bounds (line 152) | def _materialised_conv_simplex_bounds(w, b, padding, strides, bounds_in): FILE: interval_bound_propagation/tests/specification_test.py function _build_spec_input (line 34) | def _build_spec_input(): function _build_classification_specification (line 49) | def _build_classification_specification(label, num_classes, collapse): class SpecificationTest (line 67) | class SpecificationTest(tf.test.TestCase): method testLinearSpecification (line 69) | def testLinearSpecification(self): method testEquivalenceLinearClassification (line 84) | def testEquivalenceLinearClassification(self): FILE: setup.py function ibp_test_suite (line 35) | def ibp_test_suite():