Skip to main content

Algorithms for inverse design

Project description

invrs-opt - Optimization algorithms for inverse design

v0.9.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

invrs_opt-0.9.2.tar.gz (46.2 kB view details)

Uploaded Source

Built Distribution

invrs_opt-0.9.2-py3-none-any.whl (49.5 kB view details)

Uploaded Python 3

File details

Details for the file invrs_opt-0.9.2.tar.gz.

File metadata

  • Download URL: invrs_opt-0.9.2.tar.gz
  • Upload date:
  • Size: 46.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for invrs_opt-0.9.2.tar.gz
Algorithm Hash digest
SHA256 18843cd189c4dac2e0ac6e8e297942ba6ea73c53b1a0523f0620a663092ef224
MD5 3cdc3a463196e041dc7392a55f09e704
BLAKE2b-256 c34e090478bbee8948ff0c46c0baabfcf4c706f786ea6cccb20ef62ce4f5afec

See more details on using hashes here.

File details

Details for the file invrs_opt-0.9.2-py3-none-any.whl.

File metadata

  • Download URL: invrs_opt-0.9.2-py3-none-any.whl
  • Upload date:
  • Size: 49.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for invrs_opt-0.9.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9d40a31c61750c00d3edf6d04adfbfd0e43efffa5a2bb9d77f0ea5d762864de8
MD5 ed7bcfccb4f05d2681ceafbad795eac4
BLAKE2b-256 3a0b691373cc55d53a07d7fa3deae727841eba7b94d055a6b26a20bbf5359e1a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page