Skip to main content

Algorithms for inverse design

Project description

invrs-opt - Optimization algorithms for inverse design

v0.7.1

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

Uploaded Source

Built Distribution

invrs_opt-0.7.1-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: invrs_opt-0.7.1.tar.gz
  • Upload date:
  • Size: 45.2 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.1.tar.gz
Algorithm Hash digest
SHA256 8d641bea7fd76317684d78aac21fa3efc429a3a54ab59627c7d2cd5064be1076
MD5 47354c98d568402efebf20a1a431ae51
BLAKE2b-256 db3e6726db8a85680ed278c9d4831ba23cf73deb1e3ced858a745edc0a3f2e75

See more details on using hashes here.

File details

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

File metadata

  • Download URL: invrs_opt-0.7.1-py3-none-any.whl
  • Upload date:
  • Size: 48.3 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bf45950dd9c6b83d266445be394c7f5b9023b417f7aebf5ac7592b908725744f
MD5 93d9d10e484fe4ae9de5791e17897cc2
BLAKE2b-256 0f233f88a6beb24e442418123cb657c0e88754746db3b9ff79ef1511c341de9b

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