← Back to C-Kernel-Engine Docs Doxygen Source Documentation
Loading...
Searching...
No Matches
diffusion_vp_common.h File Reference
#include <math.h>

Go to the source code of this file.

Functions

static double vp_sigmoid (double x)

Function Documentation

◆ vp_sigmoid()

double vp_sigmoid ( double x)
inlinestatic

Definition at line 6 of file diffusion_vp_common.h.

7{
8 if (x >= 0.0) return 1.0 / (1.0 + exp(-x));
9 const double e = exp(x);
10 return e / (1.0 + e);
11}

Referenced by ck_diffusion_vp_condition_inputs_checked(), ck_diffusion_vp_ddim_step_schedule_f64(), and ck_diffusion_vp_ddpm_step_f64().