tidy3d.plugins.invdes.InverseDesignResult#
- class InverseDesignResult[source]#
Bases:
InvdesBaseModelContainer for the result of an
InverseDesign.run()call.- Parameters:
design (Union[
InverseDesign,InverseDesignMulti]) – Specification describing the inverse design problem we wish to optimize.params (tuple[ArrayLike, ...] = ()) – History of parameter arrays throughout the optimization.
objective_fn_val (tuple[float, ...] = ()) – History of objective function values throughout the optimization.
grad (tuple[ArrayLike, ...] = ()) – History of objective function gradient arrays throughout the optimization.
penalty (tuple[float, ...] = ()) – History of weighted sum of penalties throughout the optimization.
post_process_val (tuple[float, ...] = ()) – History of return values from
post_process_fnthroughout the optimization.simulation (tuple[
Simulation, …] = ()) – History oftd.Simulationinstances throughout the optimization.opt_state (tuple[dict[str, Union[int, ArrayLike]], ...] = ()) – History of optimizer states throughout the optimization.
Attributes
The history-containing fields as a dictionary of lists.
Keys stored in the history.
Dictionary of last values in
self.history.The last simulation.
Methods
get(key[, index])Get the value from the history at a certain index (-1 means last).
get_last(key)Get the last value from the history.
get_sim([index])Get the simulation at a specific index in the history (list of sims if multi).
get_sim_data([index])Get the simulation data at a specific index in the history (list of simdata if multi).
Plot the optimization progress from the history.
sim_data_last(**kwargs)Run the last simulation and return its data.
- design#
- params#
- objective_fn_val#
- grad#
- penalty#
- post_process_val#
- simulation#
- opt_state#
- property history#
The history-containing fields as a dictionary of lists.
- property keys#
Keys stored in the history.
- property last#
Dictionary of last values in
self.history.
- get_sim(index=-1)[source]#
Get the simulation at a specific index in the history (list of sims if multi).
- get_sim_data(index=-1, **kwargs)[source]#
Get the simulation data at a specific index in the history (list of simdata if multi).
- property sim_last#
The last simulation.