Skip to main content

Algorithms for inverse design

Project description

invrs-opt - Optimization algorithms for inverse design

v0.1.3

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

Uploaded Source

Built Distribution

invrs_opt-0.1.3-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: invrs_opt-0.1.3.tar.gz
  • Upload date:
  • Size: 13.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for invrs_opt-0.1.3.tar.gz
Algorithm Hash digest
SHA256 7e4612a10de6f87bfb63074c32ec3ce435e9aaee0dc2e55ff18446838dcab58b
MD5 25dce57d87ac7a2094b74f234c00cd2a
BLAKE2b-256 c95b0f642717b6f930f80a826e69e244e04146b175b5e87f1a9a95bba0d280f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: invrs_opt-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.0

File hashes

Hashes for invrs_opt-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8a1cc2b4a3e16e22a47c1ac0143a0300b25023b8483864dfdc6c896a88d634bc
MD5 b6f3d1dcf0b54afdd0b4f527e7f361ee
BLAKE2b-256 60385fe5583b6479531771611de89794bcccafd8ccfd5827437fd3e28415f298

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