Algorithms for inverse design
Project description
invrs-opt - Optimization algorithms for inverse design
v0.1.0
Overview
The invrs-opt
package defines an optimizer API intended for topology optimization, inverse design, or AI-guided design. It (currently) implements the L-BFGS-B optimization algorithm along with some variants. The API is intended to be general so that new algorithms can be accommodated, and is inspired by the functional optimizer approach used in jax. Example usage is as follows:
initial_params = ...
optimizer = invrs_opt.lbfgsb()
state = optimizer.init(initial_params)
for _ in range(steps):
params = optimizer.params(state)
value, grad = jax.value_and_grad(loss_fn)(params)
state = optimizer.update(grad=grad, value=value, params=params, state=state)
Optimizers in invrs-opt
are compatible with custom types defined in the totypes package. The basic lbfgsb
optimizer enforces bounds for custom types, while the density_lbfgsb
optimizer implements a filter-and-threshold operation for DensityArray2D
types to ensure that solutions have the correct length scale.
Install
pip install invrs_opt
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file invrs_opt-0.1.0.tar.gz
.
File metadata
- Download URL: invrs_opt-0.1.0.tar.gz
- Upload date:
- Size: 13.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca19e3a4d40a552e9e4fbdfeb8290b1d156dbf04c1d6a9b69fb318e88e8c6e85 |
|
MD5 | 09bea83edefee93ffbeaaf494b29c8fc |
|
BLAKE2b-256 | d76ef161a1ab4c60afaf36dc5a8af09e70d270b31e161c684ab832a9d2344400 |
File details
Details for the file invrs_opt-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: invrs_opt-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c04aad31879ab49d0c33ea98e9b26247e5277c72a9a662c5e6c7df39d423c82 |
|
MD5 | 8819b9a20735e15e8c67dd237ba4f41f |
|
BLAKE2b-256 | eeecaf9c8212c0660215258063b9f1e9cabc5c7d96d3ccc08c4737a19db9f95f |