MCPcopy Create free account

hub / github.com/NVlabs/DiffPure / functions

Functions875 in github.com/NVlabs/DiffPure

↓ 1 callersMethod_setup_attack
(self)
stadv_eot/attacks.py:68
↓ 1 callersMethod_update_ema
(self)
guided_diffusion/train_util.py:224
↓ 1 callersMethod_warmed_up
(self)
guided_diffusion/resample.py:161
↓ 1 callersMethodadd_to_params
Assumes only one parameters object in the Spatial Transform
stadv_eot/recoloradv/perturbations.py:93
↓ 1 callersMethodadd_to_params
sets params to be self.params + grad_data
stadv_eot/recoloradv/mister_ed/adversarial_perturbations.py:496
↓ 1 callersMethodadd_to_params
Assumes only one parameters object in the Spatial Transform
stadv_eot/recoloradv/mister_ed/adversarial_perturbations.py:594
↓ 1 callersMethodattack
Builds some adversarial examples given real inputs and labels ARGS: inputs : torch.Tensor (NxCxHxW) - tensor with examples needed
stadv_eot/recoloradv/mister_ed/adversarial_training.py:68
↓ 1 callersMethodattack_batch
(self, X, y)
bpda_eot/bpda_eot_attack.py:127
↓ 1 callersFunctionavg_pool_nd
Create a 1D, 2D, or 3D average pooling module.
guided_diffusion/nn.py:50
↓ 1 callersMethodbackward
(ctx, *output_grads)
guided_diffusion/nn.py:161
↓ 1 callersFunctionbetas_for_alpha_bar
Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of (1-beta) over time from t = [
guided_diffusion/gaussian_diffusion.py:53
↓ 1 callersFunctioncenter_crop_arr
(pil_image, image_size)
guided_diffusion/image_datasets.py:134
↓ 1 callersFunctioncheck_overflow
(value)
guided_diffusion/fp16_util.py:243
↓ 1 callersFunctionclassifier_defaults
Defaults for classifier models.
guided_diffusion/script_util.py:35
↓ 1 callersMethodclip_params
Clips the parameters to be between 0 and 1 and also within the color space's gamut.
stadv_eot/recoloradv/color_transformers.py:209
↓ 1 callersMethodclip_params
Clips the parameters to be between -1 and 1 as required for grid_sample
stadv_eot/recoloradv/mister_ed/spatial_transformers.py:232
↓ 1 callersMethodcollect_successful
Returns a list of [adversarials, originals] of the SUCCESSFUL attacks only, according to the given classifier_net, normalizer
stadv_eot/recoloradv/mister_ed/adversarial_perturbations.py:256
↓ 1 callersMethodcondition_mean
Compute the mean for the previous step, given a function cond_fn that computes the gradient of a conditional log probability with res
guided_diffusion/gaussian_diffusion.py:364
↓ 1 callersMethodcondition_score
Compute what the p_mean_variance output would have been, should the model's score function be conditioned by cond_fn. See co
guided_diffusion/gaussian_diffusion.py:379
↓ 1 callersMethodconstrain_params
(self, x=None)
stadv_eot/recoloradv/perturbations.py:79
↓ 1 callersMethodconstrain_params
(self, x=None)
stadv_eot/recoloradv/mister_ed/adversarial_perturbations.py:577
↓ 1 callersMethodconstrain_params
(self)
stadv_eot/recoloradv/mister_ed/adversarial_perturbations.py:733
↓ 1 callersMethodconstruct_identity_params
(batch_size, resolution_x, resolution_y, resolution_z, device)
stadv_eot/recoloradv/color_transformers.py:362
↓ 1 callersFunctioncontract_inner
tensordot(x, y, 1).
score_sde/models/layers.py:537
↓ 1 callersFunctionconv_downsample_2d
Fused `tf.nn.conv2d()` followed by `downsample_2d()`. Padding is performed only once at the beginning, not between the operations. The fused
score_sde/models/up_or_down_sampling.py:152
↓ 1 callersFunctioncreate_classifier
( image_size, classifier_use_fp16, classifier_width, classifier_depth, classifier_attentio
guided_diffusion/script_util.py:236
↓ 1 callersFunctioncreate_model
( image_size, num_channels, num_res_blocks, channel_mult="", learn_sigma=False, class_
guided_diffusion/script_util.py:138
↓ 1 callersMethoddata_count
Returns the number of data points in this logger instance
stadv_eot/recoloradv/mister_ed/utils/pytorch_utils.py:582
↓ 1 callersMethodddim_sample
Sample x_{t-1} from the model using DDIM. Same usage as p_sample().
guided_diffusion/gaussian_diffusion.py:545
↓ 1 callersMethodddim_sample_loop_progressive
Use DDIM to sample from the model and yield intermediate samples from each timestep of DDIM. Same usage as p_sample_loop_pro
guided_diffusion/gaussian_diffusion.py:667
↓ 1 callersFunctiondenoise_update_fn
(model, x)
score_sde/sampling.py:435
↓ 1 callersMethoddiscretize
Discretize the SDE in the form: x_{i+1} = x_i + f_i(x_i) + G_i z_i. Useful for reverse diffusion sampling and probabiliy flow sampling. Defau
score_sde/sde_lib.py:60
↓ 1 callersFunctiondiscretize_image
Discretizes an image tensor into a tensor filled with ints ranging between 0 and 255 ARGS: img_tensor : floatTensor (NxCxHxW) - t
stadv_eot/recoloradv/mister_ed/utils/discretization.py:35
↓ 1 callersFunctiondiscretized_gaussian_log_likelihood
Compute the log-likelihood of a Gaussian distribution discretizing to a given image. :param x: the target images. It is assumed that thi
guided_diffusion/losses.py:58
↓ 1 callersFunctiondownsample
(images, size=256)
classifiers/attribute_classifier.py:15
↓ 1 callersFunctiondrift_fn
Get the drift function of the reverse-time SDE.
score_sde/sampling.py:443
↓ 1 callersMethodeot_attack_loss
(self, logits, y, reps=1, eot_attack_ave='loss')
bpda_eot/bpda_eot_attack.py:55
↓ 1 callersMethodeot_defense_prediction
(seslf, logits, reps=1, eot_defense_ave=None)
bpda_eot/bpda_eot_attack.py:41
↓ 1 callersMethodeot_defense_verification
(self, X_adv, y, correct, defended)
bpda_eot/bpda_eot_attack.py:112
↓ 1 callersMethodeval
Outputs the accuracy of the adversarial examples NOTE: notice the difference between N and N' in the argument ARGS:
stadv_eot/recoloradv/mister_ed/adversarial_training.py:105
↓ 1 callersFunctioneval_autoattack
(args, config, model, x_val, y_val, adv_batch_size, log_dir)
eval_sde_adv.py:96
↓ 1 callersFunctioneval_bpda
(args, config, model, x_val, y_val, adv_batch_size, log_dir)
eval_sde_adv_bpda.py:121
↓ 1 callersFunctioneval_stadv
(args, config, model, x_val, y_val, adv_batch_size, log_dir)
eval_sde_adv.py:158
↓ 1 callersFunctionfind_ema_checkpoint
(main_checkpoint, step, rate)
guided_diffusion/train_util.py:293
↓ 1 callersMethodforward
(self, x)
stadv_eot/recoloradv/mister_ed/adversarial_perturbations.py:525
↓ 1 callersMethodforward
Normalizes var by subtracting the mean of each channel and then dividing each channel by standard dev ARGS: self - st
stadv_eot/recoloradv/mister_ed/utils/pytorch_utils.py:546
↓ 1 callersMethodforward
(self, x)
guided_diffusion/nn.py:21
↓ 1 callersMethodforward
(self, x)
guided_diffusion/unet.py:108
↓ 1 callersMethodforward_backward
(self, batch, cond)
guided_diffusion/train_util.py:188
↓ 1 callersFunctionfrom_flattened_numpy
Form a torch tensor with the given `shape` from a flattened numpy array `x`.
score_sde/models/utils.py:185
↓ 1 callersFunctionfused_leaky_relu
(input, bias, negative_slope=0.2, scale=2 ** 0.5)
score_sde/op/fused_act.py:94
↓ 1 callersFunctiongaussian
(window_size, sigma)
stadv_eot/recoloradv/mister_ed/utils/pytorch_ssim.py:23
↓ 1 callersFunctionget_beta_schedule
(*, beta_start, beta_end, num_diffusion_timesteps)
runners/diffpure_ddpm.py:19
↓ 1 callersFunctionget_corrector
(name)
score_sde/sampling.py:76
↓ 1 callersFunctionget_ddpm_loss_fn
Legacy code to reproduce previous results on DDPM. Not recommended for new work.
score_sde/losses.py:128
↓ 1 callersFunctionget_logit
(net, im)
classifiers/attribute_classifier.py:30
↓ 1 callersFunctionget_model
(name)
score_sde/models/utils.py:45
↓ 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
score_sde/models/utils.py:96
↓ 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
score_sde/sampling.py:414
↓ 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.
score_sde/sampling.py:355
↓ 1 callersFunctionget_predictor
(name)
score_sde/sampling.py:72
↓ 1 callersFunctionget_rank_without_mpi_import
()
guided_diffusion/logger.py:411
↓ 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
score_sde/losses.py:55
↓ 1 callersFunctionget_smld_loss_fn
Legacy code to reproduce previous results on SMLD(NCSN). Not recommended for new work.
score_sde/losses.py:104
↓ 1 callersFunctionget_softmaxed
(net, im)
classifiers/attribute_classifier.py:36
↓ 1 callersFunctionget_timestep_embedding
This matches the implementation in Denoising Diffusion Probabilistic Models: From Fairseq. Build sinusoidal embeddings. This matches
ddpm/unet_ddpm.py:14
↓ 1 callersMethodidentity_params
(self, shape)
stadv_eot/recoloradv/mister_ed/spatial_transformers.py:483
↓ 1 callersFunctionimage_editing_denoising_step_flexible_mask
Sample from p(x_{t-1} | x_t)
runners/diffpure_ddpm.py:37
↓ 1 callersFunctionimagenet_lmdb_dataset
You can create this dataloader using: train_data = imagenet_lmdb_dataset(traindir, transform=train_transform) valid_data = imagenet_lmdb_
data/datasets.py:269
↓ 1 callersFunctionlerp_clip
(a, b, t)
classifiers/attribute_net.py:13
↓ 1 callersFunctionload_attribute_classifier
(attribute, ckpt_path=None)
classifiers/attribute_classifier.py:43
↓ 1 callersFunctionload_state_dict_from_filename
Skips the whole parameter argument thing and just loads the whole state dict from a filename. ARGS: filename : string - filename
stadv_eot/recoloradv/mister_ed/utils/checkpoints.py:146
↓ 1 callersMethodlog_datapoint
Logs the full data point ARGS: name: string - name of existing series in self.series data_tuple : tuple of form ((epo
stadv_eot/recoloradv/mister_ed/utils/pytorch_utils.py:619
↓ 1 callersFunctionlog_loss_dict
(diffusion, ts, losses)
guided_diffusion/train_util.py:303
↓ 1 callersMethodlog_step
(self)
guided_diffusion/train_util.py:236
↓ 1 callersFunctionlogkv
Log a value of some diagnostic Call this once for each diagnostic quantity, each iteration If called many times, last value will be used.
guided_diffusion/logger.py:220
↓ 1 callersMethodmake_grid
(self, x)
stadv_eot/recoloradv/mister_ed/spatial_transformers.py:388
↓ 1 callersMethodmake_grid
(self, x)
stadv_eot/recoloradv/mister_ed/spatial_transformers.py:421
↓ 1 callersMethodmake_grid
(self)
stadv_eot/recoloradv/mister_ed/spatial_transformers.py:492
↓ 1 callersFunctionmake_output_format
(format, ev_dir, log_suffix="")
guided_diffusion/logger.py:199
↓ 1 callersFunctionmake_table
(root)
data/datasets.py:110
↓ 1 callersMethodmake_valid_image
(self, x)
stadv_eot/recoloradv/mister_ed/adversarial_perturbations.py:725
↓ 1 callersFunctionmaster_params_to_model_params
Copy the master parameter data back into the model parameters.
guided_diffusion/fp16_util.py:73
↓ 1 callersFunctionmaster_params_to_state_dict
( model, param_groups_and_shapes, master_params, use_fp16 )
guided_diffusion/fp16_util.py:103
↓ 1 callersMethodmaster_params_to_state_dict
(self, master_params)
guided_diffusion/fp16_util.py:234
↓ 1 callersFunctionmax_res_from_state_dict
(state_dict)
classifiers/attribute_net.py:214
↓ 1 callersMethodmerge_xform
Takes in an other instance of this same class with the same shape of parameters (NxSHAPE) and a self_mask bytetensor of length
stadv_eot/recoloradv/color_transformers.py:234
↓ 1 callersMethodmerge_xform
Takes in an other instance of this same class with the same shape of parameters (NxSHAPE) and a self_mask bytetensor of length
stadv_eot/recoloradv/mister_ed/spatial_transformers.py:241
↓ 1 callersFunctionmodel_grads_to_master_grads
Copy the gradients from the model parameters into the master parameters from make_master_params().
guided_diffusion/fp16_util.py:60
↓ 1 callersFunctionmpi_weighted_mean
Copied from: https://github.com/openai/baselines/blob/ea25b9e8b234e6ee1bca43083f8f3cf974143998/baselines/common/mpi_util.py#L110 Perform a we
guided_diffusion/logger.py:420
↓ 1 callersMethodode_fn
Create the drift and diffusion functions for the reverse SDE
runners/diffpure_ode.py:90
↓ 1 callersMethodoptimize
(self, opt: th.optim.Optimizer)
guided_diffusion/fp16_util.py:191
↓ 1 callersFunctionoptimize_fn
Optimizes with warmup and gradient clipping (disabled if negative).
score_sde/losses.py:41
↓ 1 callersMethodp_sample_loop_progressive
Generate samples from the model and yield intermediate samples from each timestep of diffusion. Arguments are the same as p_
guided_diffusion/gaussian_diffusion.py:495
↓ 1 callersFunctionparam_grad_or_zeros
(param)
guided_diffusion/fp16_util.py:149
↓ 1 callersFunctionparse_args_and_config
()
eval_sde_adv_bpda.py:205
↓ 1 callersFunctionparse_args_and_config
()
eval_sde_adv.py:245
↓ 1 callersFunctionparse_resume_step_from_filename
Parse filenames of the form path/to/modelNNNNNN.pt, where NNNNNN is the checkpoint's number of steps.
guided_diffusion/train_util.py:266
↓ 1 callersMethodpgd_update
(self, X_adv, grad, X, adv_norm, adv_eps, adv_eta, eps=1e-10)
bpda_eot/bpda_eot_attack.py:86
↓ 1 callersMethodpredict
(self, X, y, requires_grad=True, reps=1, eot_defense_ave=None, eot_attack_ave='loss')
bpda_eot/bpda_eot_attack.py:73
← previousnext →201–300 of 875, ranked by callers