Skip to content

Commit de2336d

Browse files
committed
optim with normalization
1 parent 0f4ff79 commit de2336d

File tree

5 files changed

+1747
-201
lines changed

5 files changed

+1747
-201
lines changed

examples/ansys/gf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
images = []
44

5-
for i in range(40):
5+
for i in range(3):
66
filename = f"tmp_img/mesh_optim_{i:03d}.png"
77
images.append(imageio.imread(filename))
88
print(f"Added {filename} to gif.")

examples/ansys/mesh_optim.gif

-1.03 MB
Loading

examples/ansys/optim_grid.ipynb

Lines changed: 1743 additions & 199 deletions
Large diffs are not rendered by default.

examples/ansys/rho_optim_sum_2.gif

501 KB
Loading

examples/ansys/sdf_fd_tess/tesseract_api.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ def denormalize_parameters(
138138
"""Denormalize the differentiable parameters."""
139139
denormalized_params = []
140140
for params in differentiable_parameters:
141-
denormalized_params.append(params / normalization_factors + normalization_bias)
141+
denormalized_params.append(
142+
(params - normalization_bias) / normalization_factors
143+
)
142144
return denormalized_params
143145

144146

0 commit comments

Comments
 (0)