Skip to content

Commit

Permalink
Merge pull request #128 from invrs-io/metric
Browse files Browse the repository at this point in the history
Improve eval metric for diffractive splitter
  • Loading branch information
mfschubert authored Jul 11, 2024
2 parents 362036e + 1e8fdb5 commit fcd2d0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/invrs_gym/challenges/diffract/splitter_challenge.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def eval_metric(self, response: common.GratingResponse) -> jnp.ndarray:
The eval metric rewards high total efficiency and minimum nonuniformity.
It is computed by,
eval_metric = 0.5 * total_efficiency + 0.5 * (1 - uniformity_error)
eval_metric = total_efficiency * (1 - uniformity_error)
In cases where multiple wavelengths or incident angles are considered, the
eval metric is the minimum across all excitation conditions.
Expand Down Expand Up @@ -146,7 +146,7 @@ def eval_metric(self, response: common.GratingResponse) -> jnp.ndarray:
+ jnp.amin(transmission, axis=(-2, -1))
)

return jnp.amin(0.5 * total_efficiency + 0.5 * (1 - uniformity_error))
return jnp.amin(total_efficiency * (1 - uniformity_error))

def metrics(
self,
Expand Down

0 comments on commit fcd2d0a

Please sign in to comment.