We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 02c4cb1 commit 6f8d224Copy full SHA for 6f8d224
xlumina/toolbox.py
@@ -13,6 +13,7 @@
13
- space
14
- wrap_phase
15
- is_conserving_energy
16
+ - softmin
17
- delta_kronecker
18
- build_LCD_cell
19
- draw_sSLM
@@ -78,6 +79,14 @@ def is_conserving_energy(light_source, propagated_light):
78
79
80
return I_propagated / I_source
81
82
+@jit
83
+def softmin(args, beta=90):
84
+ """
85
+ Differentiable version for min() function.
86
87
+ return - nn.logsumexp(-beta * args) / beta
88
+
89
90
def delta_kronecker(a, b):
91
"""
92
Computes the Kronecker delta.
0 commit comments