Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Trustworthy-AI-Group/TransferAttack
/ functions
Functions
2,264 in github.com/Trustworthy-AI-Group/TransferAttack
⨍
Functions
2,264
◇
Types & classes
551
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
Function
add_dict_to_argparser
(parser, default_dict)
defense/diffpure/guided_diffusion/script_util.py:435
Function
add_noise
(x)
transferattack/input_transformation/l2t.py:73
Method
add_noise
(self, x)
transferattack/input_transformation/sia.py:66
Method
add_noise
(self, x)
transferattack/input_transformation/ssm_with_tricks.py:324
Function
adjust_learning_rate
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
defense/at/lib/utils.py:29
Function
adjust_learning_rate
Sets the learning rate to the initial LR decayed by 10 every 30 epochs
transferattack/model_related/qaa_utils/train.py:202
Function
args_to_dict
(args, keys)
defense/diffpure/guided_diffusion/script_util.py:445
Method
attn_ATT
(module, grad_in, grad_out)
transferattack/model_related/att.py:83
Method
attn_add_pit
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:227
Method
attn_add_vis
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:319
Method
attn_add_vit
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:115
Method
attn_cait_tgr
(module, grad_in, grad_out, gamma)
transferattack/model_related/tgr.py:87
Method
attn_drop_mask_grad
(module, grad_in, grad_out, gamma)
transferattack/model_related/pna_patchout.py:125
Method
attn_record_pit_stage
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:192
Method
attn_record_vis_stage
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:294
Method
attn_record_vit_stage
(module, grad_in, grad_out, gamma)
transferattack/model_related/vdc.py:98
Method
attn_tgr
(module, grad_in, grad_out, gamma)
transferattack/model_related/tgr.py:53
Method
backward
(self, loss: th.Tensor)
defense/diffpure/guided_diffusion/fp16_util.py:184
Method
backward
(ctx, gradgrad_input, gradgrad_bias)
defense/diffpure/score_sde/op/fused_act.py:51
Method
backward
(ctx, grad_output)
defense/diffpure/score_sde/op/fused_act.py:72
Method
backward
(ctx, gradgrad_input)
defense/diffpure/score_sde/op/upfirdn2d.py:71
Method
backward
(ctx, grad_LL)
transferattack/model_related/metassa.py:138
Method
backward
(ctx, grad_output)
transferattack/model_related/metassa.py:347
Method
backward
(ctx, grad_output)
transferattack/model_related/metassa.py:550
Method
backward
(ctx, grad_output)
transferattack/model_related/bpa.py:78
Method
backward
(ctx, grad_output)
transferattack/model_related/bpa.py:120
Function
backward_hook
(self, grad_input, grad_output)
transferattack/model_related/ata_vit_utils/Transformer_Explainability/modules/layers_ours.py:30
Function
backward_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
Function
base_patch16_224_hierarchical
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit_ensemble.py:140
Method
between_steps
(self)
transferattack/generation/diffattack.py:707
Method
blur
(self, x)
transferattack/input_transformation/sia.py:78
Method
calc_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
Method
callback_fn
(x, convergence)
transferattack/input_transformation/lpm.py:98
Method
certify
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
Function
clamp
(x, x_min, x_max)
defense/rs/datasets.py:136
Function
classifier_and_diffusion_defaults
()
defense/diffpure/guided_diffusion/script_util.py:76
Method
clear_cache
Clear gradient cache
transferattack/gradient/foolmix.py:437
Method
close
(self)
defense/diffpure/guided_diffusion/logger.py:101
Method
close
(self)
defense/diffpure/guided_diffusion/logger.py:117
Method
close
(self)
defense/diffpure/guided_diffusion/logger.py:154
Method
close
(self)
defense/diffpure/guided_diffusion/logger.py:193
Method
closure
()
transferattack/model_related/awt.py:88
Method
closure
(*inputs)
transferattack/model_related/llta_networks/models/decaydensenet.py:62
Method
closure
(*inputs)
transferattack/model_related/llta_networks/models/decaydensenet.py:132
Method
compute_mask
(self, t: torch.Tensor, default_mask)
transferattack/ensemble/sasd_ws.py:146
Function
compute_n_params
(model, return_str=True)
defense/diffpure/utils.py:19
Method
condition_mean
(self, cond_fn, *args, **kwargs)
defense/diffpure/guided_diffusion/respace.py:106
Method
condition_score
(self, cond_fn, *args, **kwargs)
defense/diffpure/guided_diffusion/respace.py:109
Function
convert_module_to_f16
Convert primitive modules to float16.
defense/diffpure/guided_diffusion/fp16_util.py:23
Function
convert_module_to_f32
Convert primitive modules to float32, undoing convert_module_to_f16().
defense/diffpure/guided_diffusion/fp16_util.py:33
Function
convert_to_DHF_model_inplace_
(model, mixup_weight_max: float, random_keep_prob: float, dhf_modules)
transferattack/model_related/dhf_networks/utils.py:70
Method
convert_to_fp16
Convert the torso of the model to float16.
defense/diffpure/guided_diffusion/unet.py:865
Method
convert_to_fp32
Convert the torso of the model to float32.
defense/diffpure/guided_diffusion/unet.py:634
Method
convert_to_fp32
Convert the torso of the model to float32.
defense/diffpure/guided_diffusion/unet.py:872
Method
count_flops
(model, _x, y)
defense/diffpure/guided_diffusion/unet.py:365
Method
count_flops
(model, _x, y)
defense/diffpure/guided_diffusion/unet.py:400
Function
create_classifier_and_diffusion
( image_size, classifier_use_fp16, classifier_width, classifier_depth, classifier_attentio
defense/diffpure/guided_diffusion/script_util.py:195
Function
create_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
Method
cross_iter_emb_momentum
(module, input, output, scale, mom_emb_decay)
transferattack/model_related/fpr.py:98
Method
crossover
(self)
transferattack/input_transformation/lpm.py:244
Method
ddim_reverse_sample
Sample x_{t+1} from the model using DDIM reverse ODE.
defense/diffpure/guided_diffusion/gaussian_diffusion.py:595
Method
ddim_sample_loop
Generate samples from the model using DDIM. Same usage as p_sample_loop().
defense/diffpure/guided_diffusion/gaussian_diffusion.py:633
Function
ddpm_conv1x1
1x1 convolution with DDPM initialization.
defense/diffpure/score_sde/models/layers.py:100
Function
debug
(*args)
defense/diffpure/guided_diffusion/logger.py:262
Function
decorator_with_name
(func)
defense/diffpure/guided_diffusion/logger.py:318
Function
deit_base_distilled_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:200
Function
deit_base_distilled_patch16_384
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:230
Function
deit_base_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:155
Function
deit_base_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/ata_vit_utils/Transformer_Explainability/baselines/ViT/ViT_LRP.py:427
Function
deit_base_patch16_384
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:215
Function
deit_small_distilled_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:185
Function
deit_small_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:140
Function
deit_tiny_distilled_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:170
Function
deit_tiny_patch16_224
(pretrained=False, **kwargs)
transferattack/model_related/setr_networks/deit.py:125
Function
deit_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
Function
densenet121
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
Function
densenet161
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
Function
densenet169
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
Function
densenet201
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
Function
dev
Get the device to use for torch.distributed.
defense/diffpure/guided_diffusion/dist_util.py:53
Function
dhf_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
Function
dhf_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
Function
dhf_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
Function
dhf_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
← previous
next →
1,401–1,500 of 2,264, ranked by callers