MCPcopy Create free account

hub / github.com/Trustworthy-AI-Group/TransferAttack / functions

Functions2,264 in github.com/Trustworthy-AI-Group/TransferAttack

Function_conv_filter
convert patch embedding weight from manual patchify + linear proj to conv
transferattack/model_related/setr_networks/vit.py:65
Function_conv_filter
convert patch embedding weight from manual patchify + linear proj to conv
transferattack/model_related/ata_vit_utils/Transformer_Explainability/baselines/ViT/ViT_LRP.py:401
Method_f
(m, i, o)
transferattack/advanced_objective/mfaa.py:85
Method_forward
(self, x, emb)
defense/diffpure/guided_diffusion/unet.py:244
Method_forward
(self, x)
defense/diffpure/guided_diffusion/unet.py:307
Method_generate_samples_for_interactions
(self, perts, seed)
transferattack/model_related/att.py:200
Method_generate_samples_for_interactions
(self, perts, seed)
transferattack/model_related/vdc.py:442
Method_hook
(_m, _inp, out)
transferattack/model_related/faug.py:169
Method_init_weights
(self, m)
transferattack/model_related/setr_networks/t2t_vit_ghost.py:146
Method_init_weights
(self, m)
transferattack/model_related/setr_networks/t2t_vit_se.py:119
Method_init_weights
(self, m)
transferattack/model_related/setr_networks/tnt.py:189
Method_init_weights
(self, m)
transferattack/model_related/setr_networks/t2t_vit.py:136
Method_init_weights
(self, m)
transferattack/model_related/setr_networks/t2t_vit_dense.py:122
Method_init_weights
(self, m)
transferattack/model_related/ata_vit_utils/Transformer_Explainability/baselines/ViT/ViT_LRP.py:292
Method_scale_timesteps
(self, t)
defense/diffpure/guided_diffusion/respace.py:119
Method_update_perts
(self, perts, grad, step_size)
transferattack/model_related/vdc.py:461
Functionadd_dict_to_argparser
(parser, default_dict)
defense/diffpure/guided_diffusion/script_util.py:435
Functionadd_noise
(x)
transferattack/input_transformation/l2t.py:73
Methodadd_noise
(self, x)
transferattack/input_transformation/sia.py:66
Methodadd_noise
(self, x)
transferattack/input_transformation/ssm_with_tricks.py:324
Functionadjust_learning_rate
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
defense/at/lib/utils.py:29
Functionadjust_learning_rate
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
transferattack/model_related/qaa_utils/train.py:202
Functionargs_to_dict
(args, keys)
defense/diffpure/guided_diffusion/script_util.py:445
Methodattn_ATT
(module, grad_in, grad_out)
transferattack/model_related/att.py:83
Methodattn_add_pit
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:227
Methodattn_add_vis
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:319
Methodattn_add_vit
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:115
Methodattn_cait_tgr
(module, grad_in, grad_out, gamma)
transferattack/model_related/tgr.py:87
Methodattn_drop_mask_grad
(module, grad_in, grad_out, gamma)
transferattack/model_related/pna_patchout.py:125
Methodattn_record_pit_stage
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:192
Methodattn_record_vis_stage
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:294
Methodattn_record_vit_stage
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:98
Methodattn_tgr
(module, grad_in, grad_out, gamma)
transferattack/model_related/tgr.py:53
Methodbackward
(self, loss: th.Tensor)
defense/diffpure/guided_diffusion/fp16_util.py:184
Methodbackward
(ctx, gradgrad_input, gradgrad_bias)
defense/diffpure/score_sde/op/fused_act.py:51
Methodbackward
(ctx, grad_output)
defense/diffpure/score_sde/op/fused_act.py:72
Methodbackward
(ctx, gradgrad_input)
defense/diffpure/score_sde/op/upfirdn2d.py:71
Methodbackward
(ctx, grad_LL)
transferattack/model_related/metassa.py:138
Methodbackward
(ctx, grad_output)
transferattack/model_related/metassa.py:347
Methodbackward
(ctx, grad_output)
transferattack/model_related/metassa.py:550
Methodbackward
(ctx, grad_output)
transferattack/model_related/bpa.py:78
Methodbackward
(ctx, grad_output)
transferattack/model_related/bpa.py:120
Functionbackward_hook
(self, grad_input, grad_output)
transferattack/model_related/ata_vit_utils/Transformer_Explainability/modules/layers_ours.py:30
Functionbackward_hook_norm
normalize the gradient to avoid gradient explosion or vanish (This code is copied from https://github.com/csdongxian/skip-connections-matter)
transferattack/model_related/sgm.py:58
Functionbase_patch16_224_hierarchical
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit_ensemble.py:140
Methodbetween_steps
(self)
transferattack/generation/diffattack.py:707
Methodblur
(self, x)
transferattack/input_transformation/sia.py:78
Methodcalc_bpd_loop
Compute the entire variational lower-bound, measured in bits-per-dim, as well as other related quantities. :param model: the
defense/diffpure/guided_diffusion/gaussian_diffusion.py:845
Methodcallback_fn
(x, convergence)
transferattack/input_transformation/lpm.py:98
Methodcertify
Monte Carlo algorithm for certifying that g's prediction around x is constant within some L2 radius. With probability at least 1 - alpha, the
defense/rs/core.py:24
Functionclamp
(x, x_min, x_max)
defense/rs/datasets.py:136
Functionclassifier_and_diffusion_defaults
()
defense/diffpure/guided_diffusion/script_util.py:76
Methodclear_cache
Clear gradient cache
transferattack/gradient/foolmix.py:437
Methodclose
(self)
defense/diffpure/guided_diffusion/logger.py:101
Methodclose
(self)
defense/diffpure/guided_diffusion/logger.py:117
Methodclose
(self)
defense/diffpure/guided_diffusion/logger.py:154
Methodclose
(self)
defense/diffpure/guided_diffusion/logger.py:193
Methodclosure
()
transferattack/model_related/awt.py:88
Methodclosure
(*inputs)
transferattack/model_related/llta_networks/models/decaydensenet.py:62
Methodclosure
(*inputs)
transferattack/model_related/llta_networks/models/decaydensenet.py:132
Methodcompute_mask
(self, t: torch.Tensor, default_mask)
transferattack/ensemble/sasd_ws.py:146
Functioncompute_n_params
(model, return_str=True)
defense/diffpure/utils.py:19
Methodcondition_mean
(self, cond_fn, *args, **kwargs)
defense/diffpure/guided_diffusion/respace.py:106
Methodcondition_score
(self, cond_fn, *args, **kwargs)
defense/diffpure/guided_diffusion/respace.py:109
Functionconvert_module_to_f16
Convert primitive modules to float16.
defense/diffpure/guided_diffusion/fp16_util.py:23
Functionconvert_module_to_f32
Convert primitive modules to float32, undoing convert_module_to_f16().
defense/diffpure/guided_diffusion/fp16_util.py:33
Functionconvert_to_DHF_model_inplace_
(model, mixup_weight_max: float, random_keep_prob: float, dhf_modules)
transferattack/model_related/dhf_networks/utils.py:70
Methodconvert_to_fp16
Convert the torso of the model to float16.
defense/diffpure/guided_diffusion/unet.py:865
Methodconvert_to_fp32
Convert the torso of the model to float32.
defense/diffpure/guided_diffusion/unet.py:634
Methodconvert_to_fp32
Convert the torso of the model to float32.
defense/diffpure/guided_diffusion/unet.py:872
Methodcount_flops
(model, _x, y)
defense/diffpure/guided_diffusion/unet.py:365
Methodcount_flops
(model, _x, y)
defense/diffpure/guided_diffusion/unet.py:400
Functioncreate_classifier_and_diffusion
( image_size, classifier_use_fp16, classifier_width, classifier_depth, classifier_attentio
defense/diffpure/guided_diffusion/script_util.py:195
Functioncreate_named_schedule_sampler
Create a ScheduleSampler from a library of pre-defined samplers. :param name: the name of the sampler. :param diffusion: the diffusion o
defense/diffpure/guided_diffusion/resample.py:16
Methodcross_iter_emb_momentum
(module, input, output, scale, mom_emb_decay)
transferattack/model_related/fpr.py:98
Methodcrossover
(self)
transferattack/input_transformation/lpm.py:244
Methodddim_reverse_sample
Sample x_{t+1} from the model using DDIM reverse ODE.
defense/diffpure/guided_diffusion/gaussian_diffusion.py:595
Methodddim_sample_loop
Generate samples from the model using DDIM. Same usage as p_sample_loop().
defense/diffpure/guided_diffusion/gaussian_diffusion.py:633
Functionddpm_conv1x1
1x1 convolution with DDPM initialization.
defense/diffpure/score_sde/models/layers.py:100
Functiondebug
(*args)
defense/diffpure/guided_diffusion/logger.py:262
Functiondecorator_with_name
(func)
defense/diffpure/guided_diffusion/logger.py:318
Functiondeit_base_distilled_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:200
Functiondeit_base_distilled_patch16_384
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:230
Functiondeit_base_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:155
Functiondeit_base_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/ata_vit_utils/Transformer_Explainability/baselines/ViT/ViT_LRP.py:427
Functiondeit_base_patch16_384
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:215
Functiondeit_small_distilled_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:185
Functiondeit_small_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:140
Functiondeit_tiny_distilled_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:170
Functiondeit_tiny_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:125
Functiondeit_tiny_patch16_224
DeiT-tiny model @ 224x224 from paper (https://arxiv.org/abs/2012.12877). ImageNet-1k weights from https://github.com/facebookresearch/deit.
transferattack/model_related/ata_vit_utils/Transformer_Explainability/baselines/ViT/ViT_LRP.py:439
Functiondensenet121
r"""Densenet-121 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
transferattack/model_related/llta_networks/models/decaydensenet.py:326
Functiondensenet161
r"""Densenet-161 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
transferattack/model_related/llta_networks/models/decaydensenet.py:340
Functiondensenet169
r"""Densenet-169 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
transferattack/model_related/llta_networks/models/decaydensenet.py:354
Functiondensenet201
r"""Densenet-201 model from `"Densely Connected Convolutional Networks" <https://arxiv.org/pdf/1608.06993.pdf>`_ Args: pretrained (bo
transferattack/model_related/llta_networks/models/decaydensenet.py:368
Functiondev
Get the device to use for torch.distributed.
defense/diffpure/guided_diffusion/dist_util.py:53
Functiondhf_inc_res_v2
(mixup_weight_max: float, random_keep_prob: float, dhf_modules = None, weights = None, progress: bool = True,
transferattack/model_related/dhf_networks/inc_res_v2.py:158
Functiondhf_inception_v3
(mixup_weight_max: float, random_keep_prob: float, dhf_modules = None, weights: Optional[Inception_V3_Weights]
transferattack/model_related/dhf_networks/inception.py:50
Functiondhf_resnet101
(mixup_weight_max: float, random_keep_prob: float, dhf_modules=None, weights: Optional[ResNet152_Weights] = No
transferattack/model_related/dhf_networks/resnet.py:302
Functiondhf_resnet152
(mixup_weight_max: float, random_keep_prob: float, dhf_modules=None, weights: Optional[ResNet152_Weights] = No
transferattack/model_related/dhf_networks/resnet.py:310
← previousnext →1,401–1,500 of 2,264, ranked by callers