Algorithms for inverse design
Project description
invrs-opt - Optimization algorithms for inverse design
v0.1.2
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.2.tar.gz
.
File metadata
- Download URL: invrs_opt-0.1.2.tar.gz
- Upload date:
- Size: 13.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 06e5417c165b15d9dbfebbc8ccbe9ce63f88c42c658f07043b0bdf410594666b |
|
MD5 | e3e904e2a2462657527c513e7b98d36a |
|
BLAKE2b-256 | 1bb6d856bbbcba452aa02712f3c514beea4c263a12be1fc2aa81eaad5eb5a110 |
File details
Details for the file invrs_opt-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: invrs_opt-0.1.2-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef9efdb350b80bf8aaade471c0da7099d83be697581fedcc777d50b051f219a5 |
|
MD5 | 8e394e3973fafa367f540258e93f9c6c |
|
BLAKE2b-256 | c92437c0c644e6f432715a1868a8b4a2156cd02e3c0631695b040435f138a2e7 |