MCPcopy Create free account

hub / github.com/ImprintLab/MedSegDiff / functions

Functions339 in github.com/ImprintLab/MedSegDiff

↓ 1 callersMethodbackward
(ctx, *output_grads)
guided_diffusion/nn.py:156
↓ 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:62
↓ 1 callersFunctioncheck_overflow
(value)
guided_diffusion/fp16_util.py:235
↓ 1 callersFunctionclassifier_defaults
Defaults for classifier models.
guided_diffusion/script_util.py:27
↓ 1 callersFunctioncond_grad_fn
Compute the gradient of the classifier, i.e. nabla_{x} log p_t(cond | x_t).
guided_diffusion/dpm_solver.py:269
↓ 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 con
guided_diffusion/gaussian_diffusion.py:390
↓ 1 callersFunctionconv_bn
(inp, oup, stride)
guided_diffusion/unet.py:151
↓ 1 callersFunctioncreate_argparser
()
scripts/segmentation_sample.py:176
↓ 1 callersFunctioncreate_argparser
()
scripts/segmentation_train.py:98
↓ 1 callersFunctioncreate_classifier
( image_size, classifier_use_fp16, classifier_width, classifier_depth, classifier_attentio
guided_diffusion/script_util.py:257
↓ 1 callersFunctioncreate_model
( image_size, num_channels, num_res_blocks, channel_mult="", learn_sigma=False, class_
guided_diffusion/script_util.py:139
↓ 1 callersFunctioncreate_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
guided_diffusion/resample.py:8
↓ 1 callersMethodddim_sample
Sample x_{t-1} from the model using DDIM. Same usage as p_sample().
guided_diffusion/gaussian_diffusion.py:659
↓ 1 callersMethoddenoise_to_zero_fn
Denoise at the final step, which is equivalent to solve the ODE from lambda_s to infty by first-order discretization.
guided_diffusion/dpm_solver.py:508
↓ 1 callersFunctiondice_score
(pred, targs)
guided_diffusion/utils.py:67
↓ 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:50
↓ 1 callersMethoddpm_solver_adaptive
The adaptive step size solver based on singlestep DPM-Solver. Args: x: A pytorch tensor. The initial value at time `t_T`.
guided_diffusion/dpm_solver.py:916
↓ 1 callersFunctioneval
(pre_eval_results)
scripts/segmentation_env_PerClass.py:41
↓ 1 callersFunctioneval_seg
threshold: a int or a tuple of int masks: [b,2,h,w] pred: [b,2,h,w]
scripts/segmentation_env.py:88
↓ 1 callersFunctionf_score
(precision, recall, beta=1)
scripts/segmentation_env_PerClass.py:120
↓ 1 callersFunctionfind_ema_checkpoint
(main_checkpoint, step, rate)
guided_diffusion/train_util.py:331
↓ 1 callersMethodforward
(self, x)
guided_diffusion/nn.py:13
↓ 1 callersMethodforward
(self, x)
guided_diffusion/unet.py:109
↓ 1 callersMethodforward
(self, input, target)
scripts/segmentation_env.py:51
↓ 1 callersMethodforward_backward
(self, batch, cond)
guided_diffusion/train_util.py:215
↓ 1 callersMethodget_orders_and_timesteps_for_singlestep_solver
Get the order of each step for sampling by the singlestep DPM-Solver. We combine both DPM-Solver-1,2,3 to use all the function evalua
guided_diffusion/dpm_solver.py:451
↓ 1 callersFunctionget_rank_without_mpi_import
()
guided_diffusion/logger.py:403
↓ 1 callersMethodhighway_forward
(self,x, hs)
guided_diffusion/unet.py:754
↓ 1 callersMethodhighway_forward
(self,x, hs = None)
guided_diffusion/unet.py:1063
↓ 1 callersFunctionintersect_and_union
(pred_label, label, num_classes, )
scripts/segmentation_env_PerClass.py:100
↓ 1 callersMethodload_part_state_dict
(self, state_dict)
guided_diffusion/unet.py:738
↓ 1 callersFunctionlog_loss_dict
(diffusion, ts, losses)
guided_diffusion/train_util.py:341
↓ 1 callersMethodlog_step
(self)
guided_diffusion/train_util.py:274
↓ 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:212
↓ 1 callersFunctionmain
()
scripts/segmentation_sample.py:45
↓ 1 callersFunctionmain
()
scripts/segmentation_train.py:24
↓ 1 callersFunctionmain
()
scripts/segmentation_env_PerClass.py:127
↓ 1 callersFunctionmain
()
scripts/segmentation_env.py:136
↓ 1 callersFunctionmake_output_format
(format, ev_dir, log_suffix="")
guided_diffusion/logger.py:191
↓ 1 callersFunctionmaster_params_to_model_params
Copy the master parameter data back into the model parameters.
guided_diffusion/fp16_util.py:65
↓ 1 callersFunctionmaster_params_to_state_dict
( model, param_groups_and_shapes, master_params, use_fp16 )
guided_diffusion/fp16_util.py:95
↓ 1 callersMethodmaster_params_to_state_dict
(self, master_params)
guided_diffusion/fp16_util.py:226
↓ 1 callersFunctionmodel_fn
The noise predicition model function that is used for DPM-Solver.
guided_diffusion/dpm_solver.py:278
↓ 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:52
↓ 1 callersFunctionmodel_wrapper
Create a wrapper function for the noise prediction model. DPM-Solver needs to solve the continuous-time diffusion ODEs. For DPMs trained on discre
guided_diffusion/dpm_solver.py:155
↓ 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:412
↓ 1 callersMethodmultistep_dpm_solver_second_update
Multistep solver DPM-Solver-2 from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The initial value at ti
guided_diffusion/dpm_solver.py:760
↓ 1 callersMethodmultistep_dpm_solver_third_update
Multistep solver DPM-Solver-3 from time `t_prev_list[-1]` to time `t`. Args: x: A pytorch tensor. The initial value at ti
guided_diffusion/dpm_solver.py:817
↓ 1 callersFunctionnorm
(t)
guided_diffusion/utils.py:92
↓ 1 callersMethodoptimize
(self, opt: th.optim.Optimizer)
guided_diffusion/fp16_util.py:183
↓ 1 callersMethodp_sample
Sample x_{t-1} from the model at the given timestep. :param model: the model to sample from. :param x: the current tensor at
guided_diffusion/gaussian_diffusion.py:417
↓ 1 callersMethodp_sample_loop_known
( self, model, shape, img, step = 1000, org=None, nois
guided_diffusion/gaussian_diffusion.py:505
↓ 1 callersFunctionparam_grad_or_zeros
(param)
guided_diffusion/fp16_util.py:141
↓ 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:304
↓ 1 callersFunctionpre_eval
(pred, seg_map)
scripts/segmentation_env_PerClass.py:90
↓ 1 callersFunctionprofile_kv
(scopename)
guided_diffusion/logger.py:294
↓ 1 callersMethodq_mean_variance
Get the distribution q(x_t | x_0). :param x_start: the [N x C x ...] tensor of noiseless inputs. :param t: the number of diff
guided_diffusion/gaussian_diffusion.py:187
↓ 1 callersMethodrun_loop
(self)
guided_diffusion/train_util.py:169
↓ 1 callersMethodrun_step
(self, batch, cond)
guided_diffusion/train_util.py:203
↓ 1 callersMethodset_comm
(self, comm)
guided_diffusion/logger.py:385
↓ 1 callersMethodset_level
(self, level)
guided_diffusion/logger.py:382
↓ 1 callersMethodsinglestep_dpm_solver_update
Singlestep DPM-Solver with the order `order` from time `s` to time `t`. Args: x: A pytorch tensor. The initial value at t
guided_diffusion/dpm_solver.py:868
↓ 1 callersFunctionspace_timesteps
Create a list of timesteps to use from an original diffusion process, given the number of timesteps we want to take from equally-sized portio
guided_diffusion/respace.py:7
↓ 1 callersFunctionsr_create_model
( large_size, small_size, num_channels, num_res_blocks, learn_sigma, class_cond, u
guided_diffusion/script_util.py:362
↓ 1 callersFunctionstaple
(a)
guided_diffusion/utils.py:45
↓ 1 callersFunctionstate_dict_to_master_params
(model, state_dict, use_fp16)
guided_diffusion/fp16_util.py:116
↓ 1 callersMethodstate_dict_to_master_params
(self, state_dict)
guided_diffusion/fp16_util.py:231
↓ 1 callersFunctiontotal_area_to_metrics
(total_area_intersect, total_area_union, total_area_pred_label,
scripts/segmentation_env_PerClass.py:56
↓ 1 callersFunctionupdate_ema
Update target parameters to be closer to those of source parameters using an exponential moving average. :param target_params: the targe
guided_diffusion/nn.py:58
↓ 1 callersMethodupdate_with_all_losses
Update the reweighting using losses from a model. Sub-classes should override this method to update the reweighting using lo
guided_diffusion/resample.py:107
↓ 1 callersMethodupdate_with_local_losses
Update the reweighting using losses from a model. Call this method from each rank with a batch of timesteps and the correspo
guided_diffusion/resample.py:71
↓ 1 callersMethodweights
Get a numpy array of weights, one per diffusion step. The weights needn't be normalized, but must be positive.
guided_diffusion/resample.py:35
↓ 1 callersMethodwritekvs
(self, kvs)
guided_diffusion/logger.py:27
↓ 1 callersMethodwriteseq
(self, seq)
guided_diffusion/logger.py:32
↓ 1 callersFunctionzero_grad
(model_params)
guided_diffusion/fp16_util.py:133
↓ 1 callersMethodzero_grad
(self)
guided_diffusion/fp16_util.py:173
Method__call__
(self, module)
guided_diffusion/utils.py:16
Method__call__
(self, x, ts, **kwargs)
guided_diffusion/respace.py:129
Method__call__
(self, x, ts, org, **kwargs)
guided_diffusion/respace.py:146
Method__enter__
(self)
guided_diffusion/utils.py:39
Method__exit__
(self, *args)
guided_diffusion/utils.py:42
Method__getitem__
Get the images
guided_diffusion/isicloader.py:31
Method__getitem__
(self, x)
guided_diffusion/bratsloader.py:46
Method__getitem__
(self, x)
guided_diffusion/bratsloader.py:116
Method__getitem__
Get the images
guided_diffusion/custom_dataset_loader.py:38
Method__getitem__
(self, x)
guided_diffusion/custom_dataset_loader.py:99
Method__init__
( self, spacial_dim: int, embed_dim: int, num_heads_channels: int, out
guided_diffusion/unet.py:36
Method__init__
(self, channels, use_conv, dims=2, out_channels=None)
guided_diffusion/unet.py:132
Method__init__
(self,ind)
guided_diffusion/unet.py:172
Method__init__
( self, channels, emb_channels, dropout, out_channels=None, us
guided_diffusion/unet.py:225
Method__init__
( self, channels, num_heads=1, num_head_channels=-1, use_checkpoint=Fa
guided_diffusion/unet.py:332
Method__init__
(self, n_heads)
guided_diffusion/unet.py:398
Method__init__
(self, n_heads)
guided_diffusion/unet.py:431
Method__init__
(self, dim, h=128, w=65)
guided_diffusion/unet.py:461
Method__init__
( self, image_size, in_channels, model_channels, out_channels,
guided_diffusion/unet.py:517
Method__init__
( self, image_size, in_channels, model_channels, out_channels,
guided_diffusion/unet.py:826
Method__init__
(self, image_size, in_channels, *args, **kwargs)
guided_diffusion/unet.py:1115
Method__init__
( self, image_size, in_channels, model_channels, out_channels,
guided_diffusion/unet.py:1132
Method__init__
(self)
guided_diffusion/unet.py:1351
Method__init__
(self)
guided_diffusion/unet.py:1371
← previousnext →101–200 of 339, ranked by callers