Skip to main content

Algorithms for inverse design

Project description

invrs-opt - Optimization algorithms for inverse design

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


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.7.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

invrs_opt-0.7.0-py3-none-any.whl (30.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for invrs_opt-0.7.0.tar.gz
Algorithm Hash digest
SHA256 473e462fdea6e7b8146613b46d988611ef628fcb77b50decbbb4682ef385181d
MD5 5ee94217de1aae46c08675f141425060
BLAKE2b-256 2c70b7d06fa560f0346162240fec434d551858683ef03cdc125495358cf0abc9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for invrs_opt-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e238d9b4ca8205a097fe6c4f430049dd31ed1ca7a2cf222ef348cd81a2e8656d
MD5 2835a51716aa73fe9b7f5eba035d402e
BLAKE2b-256 306db96830aab91c3f95c0552efe5aef226e533cfbfa4d1d18282c5d66715d9a

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