MCPcopy Create free account

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

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

↓ 1 callersMethodget_loss
(self, logits, y_src, y_tgt, **kwargs)
transferattack/input_transformation/idaa.py:125
↓ 1 callersMethodget_loss
Calculate the loss
transferattack/input_transformation/pam.py:82
↓ 1 callersMethodget_loss
The loss calculation, which should be overrideen when the attack change the loss calculation (e.g., ATA, etc.)
transferattack/input_transformation/l2t.py:424
↓ 1 callersMethodget_maskgrad
(self, images: Tensor, labels: Tensor)
transferattack/advanced_objective/p2fa.py:60
↓ 1 callersMethodget_maskgrad
(self, data, labels)
transferattack/advanced_objective/bfa.py:62
↓ 1 callersMethodget_matrix
generating the matrices: \\mathcal{L}, \\mathcal{H} :return: self.matrix_low = \\mathcal{L}, self.matrix_high = \\mathcal{H}
transferattack/model_related/metassa.py:170
↓ 1 callersMethodget_matrix
生成变换矩阵 generating the matrices: \\mathcal{L}, \\mathcal{H} :return: self.matrix_low = \\mathcal{L}, self.matrix_high = \\math
transferattack/model_related/metassa.py:266
↓ 1 callersMethodget_matrix
生成变换矩阵 generating the matrices: \\mathcal{L}, \\mathcal{H} :return: self.matrix_low = \\mathcal{L}, self.matrix_high = \\math
transferattack/model_related/metassa.py:377
↓ 1 callersMethodget_matrix
生成变换矩阵 generating the matrices: \\mathcal{L}, \\mathcal{H} :return: self.matrix_low = \\mathcal{L}, self.matrix_high = \\math
transferattack/model_related/metassa.py:468
↓ 1 callersMethodget_mixed_images
Apply Mixed-Frequency Input transformation. - With probability (1 - diversity_prob), bypass and return x (no transform). - Us
transferattack/input_transformation/mfi.py:140
↓ 1 callersFunctionget_model
(name)
defense/diffpure/score_sde/models/utils.py:45
↓ 1 callersFunctionget_model
(model_name)
transferattack/model_related/setr.py:75
↓ 1 callersMethodget_model
(self, model_name)
transferattack/model_related/ata_vit.py:149
↓ 1 callersFunctionget_model_fn
Create a function to give the output of the score-based model. Args: model: The score model. train: `True` for training and `False` f
defense/diffpure/score_sde/models/utils.py:96
↓ 1 callersMethodget_momentum
The momentum calculation
transferattack/attack.py:124
↓ 1 callersMethodget_momentum
The momentum calculation
transferattack/advanced_objective/potrip.py:108
↓ 1 callersMethodget_n_rap
(self, data, label)
transferattack/gradient/rap.py:91
↓ 1 callersFunctionget_net
(input_size, block, fwd_out, num_fwd, back_out, num_back, n, hard_mining = 0, loss_norm = False)
defense/hgd/resnext.py:231
↓ 1 callersFunctionget_net
(input_size, block, fwd_out, num_fwd, back_out, num_back, n, hard_mining = 0, loss_norm = False)
defense/hgd/inceptionresnet.py:502
↓ 1 callersFunctionget_net
(input_size, block, fwd_out, num_fwd, back_out, num_back, n, hard_mining = 0, loss_norm = False)
defense/hgd/inception.py:479
↓ 1 callersFunctionget_net
(net_type, input_size, block, fwd_out, num_fwd, back_out, num_back, n, hard_mining = 0, loss_norm = False)
defense/hgd/resnet.py:282
↓ 1 callersMethodget_new_ops
(self, k=2)
transferattack/input_transformation/ops.py:67
↓ 1 callersFunctionget_normalize_layer
Return the dataset's normalization layer
defense/rs/datasets.py:32
↓ 1 callersFunctionget_ode_sampler
Probability flow ODE sampler with the black-box ODE solver. Args: sde: An `sde_lib.SDE` object that represents the forward SDE. shape: A se
defense/diffpure/score_sde/sampling.py:414
↓ 1 callersMethodget_params
x: (C, H, W)· returns (C), (C), (C)
transferattack/gradient/mumodig.py:218
↓ 1 callersFunctionget_parser
()
main.py:10
↓ 1 callersFunctionget_pc_sampler
Create a Predictor-Corrector (PC) sampler. Args: sde: An `sde_lib.SDE` object representing the forward SDE. shape: A sequence of integers.
defense/diffpure/score_sde/sampling.py:355
↓ 1 callersMethodget_points_gradient
Calculate the gradients of the sampled points
transferattack/gradient/mef.py:65
↓ 1 callersFunctionget_position_angle_vec
(position)
transferattack/model_related/setr_networks/transformer_block.py:81
↓ 1 callersFunctionget_predictor
(name)
defense/diffpure/score_sde/sampling.py:72
↓ 1 callersFunctionget_rank_without_mpi_import
()
defense/diffpure/guided_diffusion/logger.py:411
↓ 1 callersMethodget_robust_momentum
Calculate momentum for robust token updates
transferattack/model_related/ll2s.py:511
↓ 1 callersMethodget_sampled_grad
Calculate the sampled gradients
transferattack/gradient/smifgrm.py:45
↓ 1 callersFunctionget_sde_loss_fn
Create a loss function for training with arbirary SDEs. Args: sde: An `sde_lib.SDE` object that represents the forward SDE. train: `True` f
defense/diffpure/score_sde/losses.py:55
↓ 1 callersFunctionget_sharpness_kernel
()
transferattack/input_transformation/aitl.py:318
↓ 1 callersFunctionget_smld_loss_fn
Legacy code to reproduce previous results on SMLD(NCSN). Not recommended for new work.
defense/diffpure/score_sde/losses.py:104
↓ 1 callersMethodget_surrogate_gradient
(self, data, delta, label, **kwargs)
transferattack/input_transformation/ops.py:122
↓ 1 callersMethodget_tar_data
(self, tar_label)
transferattack/advanced_objective/aa.py:49
↓ 1 callersMethodget_theta
(self, i, j)
transferattack/gradient/anda.py:62
↓ 1 callersMethodget_thetas
(self, n, min_r=-0.5, max_r=0.5)
transferattack/gradient/anda.py:66
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: From Fairseq. Build sinusoidal embeddings. This matches
defense/diffpure/ddpm/unet_ddpm.py:14
↓ 1 callersFunctionget_transform_list
Model checkpoints can be download from: https://drive.google.com/drive/folders/14unrFNAkglh4y-Jsas29WOpmMydt8-bm?usp=sharing
transferattack/input_transformation/aitl.py:105
↓ 1 callersMethodget_trap_loss
(self, h_star, h_adv, h_x)
transferattack/advanced_objective/trap.py:82
↓ 1 callersMethodget_update_direction
Calculate update direction
transferattack/gradient/foolmix.py:332
↓ 1 callersMethodget_variance
Calculate the gradient variance
transferattack/gradient/vmifgsm.py:42
↓ 1 callersMethodgkern
(self, kernlen=15, nsig=3)
transferattack/advanced_objective/fft.py:84
↓ 1 callersMethodgkern
(self, kernel_size=3, nsig=3)
transferattack/input_transformation/sia.py:69
↓ 1 callersMethodgkern
(self, kernlen=15, nsig=3)
transferattack/input_transformation/odi/odi.py:333
↓ 1 callersFunctionhsv_to_rgb
(hsv)
transferattack/input_transformation/aitl.py:462
↓ 1 callersMethodidct_2d
2-dimentional Inverse Discrete Cosine Transform (IDCT)
transferattack/gradient/fgsra.py:117
↓ 1 callersMethodidct_2d
The inverse to 2D DCT-II, which is a scaled Discrete Cosine Transform, Type III Our definition of idct is that idct_2d(dct_2d(x)) ==
transferattack/input_transformation/ssm.py:194
↓ 1 callersMethodidct_2d
The inverse to 2D DCT-II, which is a scaled Discrete Cosine Transform, Type III Our definition of idct is that idct_2d(dct_2d(x)) ==
transferattack/input_transformation/ssm_with_tricks.py:210
↓ 1 callersMethodidct_2d
(self, x, norm=None)
transferattack/input_transformation/sid.py:76
↓ 1 callersMethodidct_2d
The inverse to 2D DCT-II, which is a scaled Discrete Cosine Transform, Type III Our definition of idct is that idct_2d(dct_2d(x)) ==
transferattack/input_transformation/l2t.py:317
↓ 1 callersMethodig
(self, data, delta, label, **kwargs)
transferattack/gradient/mumodig.py:89
↓ 1 callersFunctionimage_editing_denoising_step_flexible_mask
Sample from p(x_{t-1} | x_t)
defense/diffpure/runners/diffpure_ddpm.py:37
↓ 1 callersMethodimage_editing_sample
(self, img=None, bs_id=0, tag=None)
defense/diffpure/runners/diffpure_ddpm.py:99
↓ 1 callersMethodimage_rotation
(self, x)
transferattack/input_transformation/bsr.py:53
↓ 1 callersMethodinit_delta_and_normal_distribute
(self, data, **kwargs)
transferattack/input_transformation/idaa.py:148
↓ 1 callersMethodinit_eps_list
(self, delta)
transferattack/input_transformation/ops.py:95
↓ 1 callersFunctioninit_latent
(latent, model, height, width, batch_size)
transferattack/generation/diffattack.py:636
↓ 1 callersMethodinit_n_rap
(self, data, random_start, **kwargs)
transferattack/gradient/rap.py:66
↓ 1 callersMethodinit_op_list
(self)
transferattack/input_transformation/ops.py:77
↓ 1 callersMethodinit_robust_tokens
Initialize robust token perturbations
transferattack/model_related/ll2s.py:499
↓ 1 callersMethodinit_weight
(self)
transferattack/generation/aim.py:88
↓ 1 callersFunctioninitialize_weights
(net_l, scale=1)
defense/nrp/modules/module_util.py:8
↓ 1 callersFunctioninitiate_logger
(output_path, evaluate)
defense/at/lib/utils.py:58
↓ 1 callersFunctioninput_admix
(input_tensor, portion=0.2)
transferattack/input_transformation/aitl.py:279
↓ 1 callersFunctioninput_admix_and_scale
(input_tensor, portion=0.2)
transferattack/input_transformation/aitl.py:283
↓ 1 callersFunctioninput_brightness
(input_tensor, factor_delta=0.5)
transferattack/input_transformation/aitl.py:296
↓ 1 callersFunctioninput_color
(input_tensor, factor_delta=0.5)
transferattack/input_transformation/aitl.py:302
↓ 1 callersFunctioninput_contrast
(input_tensor, factor_delta=0.5)
transferattack/input_transformation/aitl.py:309
↓ 1 callersFunctioninput_crop
(input_tensor)
transferattack/input_transformation/aitl.py:388
↓ 1 callersFunctioninput_cutout
(input_tensor)
transferattack/input_transformation/aitl.py:431
↓ 1 callersFunctioninput_gamma
(input_tensor, delta=1.0)
transferattack/input_transformation/aitl.py:423
↓ 1 callersFunctioninput_hue
(input_tensor, delta=0.2)
transferattack/input_transformation/aitl.py:515
↓ 1 callersFunctioninput_invert
(input_tensor)
transferattack/input_transformation/aitl.py:436
↓ 1 callersFunctioninput_reshape
(input_tensor, delta=0.5)
transferattack/input_transformation/aitl.py:369
↓ 1 callersFunctioninput_resize
(input_tensor, resize_rate=1.15, diversity_prob=1.0)
transferattack/input_transformation/aitl.py:406
↓ 1 callersFunctioninput_rotate
(input_tensor, theta=np.pi/6)
transferattack/input_transformation/aitl.py:383
↓ 1 callersFunctioninput_saturation
(input_tensor)
transferattack/input_transformation/aitl.py:528
↓ 1 callersFunctioninput_scale
(input_tensor)
transferattack/input_transformation/aitl.py:288
↓ 1 callersFunctioninput_sharpness
(input_tensor, factor_delta=0.5)
transferattack/input_transformation/aitl.py:325
↓ 1 callersFunctioninput_shearX
(input_tensor, delta=0.5)
transferattack/input_transformation/aitl.py:332
↓ 1 callersFunctioninput_shearY
(input_tensor, delta=0.5)
transferattack/input_transformation/aitl.py:341
↓ 1 callersFunctioninput_translateX
(input_tensor, delta=0.4)
transferattack/input_transformation/aitl.py:351
↓ 1 callersFunctioninput_translateY
(input_tensor, delta=0.4)
transferattack/input_transformation/aitl.py:360
↓ 1 callersMethodinverse_cdf
(self,u, m)
transferattack/gradient/liboost.py:55
↓ 1 callersFunctionlatent2image
(vae, latents)
transferattack/generation/diffattack.py:650
↓ 1 callersFunctionlinbp_backw_resnet50
(img, loss, conv_out_ls, ori_mask_ls, relu_out_ls, conv_input_ls, xp)
transferattack/model_related/linbp.py:163
↓ 1 callersFunctionlinbp_forw_resnet50
(model, x, do_linbp, linbp_layer)
transferattack/model_related/linbp.py:78
↓ 1 callersMethodlinear_fusion
(self, patch, x, omega=0.5)
transferattack/input_transformation/sid.py:110
↓ 1 callersMethodload_Gmodel
(self, target_class)
transferattack/generation/m3d.py:32
↓ 1 callersMethodload_Gmodel
(self)
transferattack/generation/dsva.py:146
↓ 1 callersMethodload_Gmodel
(self, target_class)
transferattack/generation/ttp.py:31
↓ 1 callersMethodload_Gmodel
(self)
transferattack/generation/cdtp.py:148
↓ 1 callersMethodload_Gmodel
(self)
transferattack/generation/ada.py:41
↓ 1 callersMethodload_atta_model
(self, **kwargs)
transferattack/input_transformation/atta.py:41
↓ 1 callersMethodload_ckpt
(self, ckpt: Union[str, Path, OrderedDict])
transferattack/generation/aim.py:27
↓ 1 callersMethodload_ge_advgan_model
(self, **kwargs)
transferattack/generation/ge_advgan.py:143
← previousnext →601–700 of 2,264, ranked by callers