Skip to main content

Algorithms for inverse design

Project description

invrs-opt - Optimization algorithms for inverse design

v0.8.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.8.1.tar.gz (45.9 kB view details)

Uploaded Source

Built Distribution

invrs_opt-0.8.1-py3-none-any.whl (48.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: invrs_opt-0.8.1.tar.gz
  • Upload date:
  • Size: 45.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.8.1.tar.gz
Algorithm Hash digest
SHA256 6d479fc5a99ce30444512730f537293e0dc919a4f9135507c8e487a4aba22685
MD5 ddaef38c2225b3ffea69209d1b93ff98
BLAKE2b-256 701012bdbfbb1db686387863c1fad216c0ad8e6a153729c1b8a808dc374f3575

See more details on using hashes here.

File details

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

File metadata

  • Download URL: invrs_opt-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 48.9 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.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f713ca4d109c211015213a1f28be4145cd44a8c2d20bf70c71b07d5a65ea3ca
MD5 4c9c5b5cd209be3dbfbb54aeadad08bd
BLAKE2b-256 6bdbbec87fa2dcfc9c83d7f4e2e46afce20fb8f9f3f5a234adc4bd524671cba4

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