Skip to main content

Algorithms for inverse design

Project description

invrs-opt - Optimization algorithms for inverse design

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

Uploaded Source

Built Distribution

invrs_opt-0.1.1-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: invrs_opt-0.1.1.tar.gz
  • Upload date:
  • Size: 13.3 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.1.tar.gz
Algorithm Hash digest
SHA256 5c8cf9421118c1cbe913d5a1785feace81457bf3369a8df54ef6eb508c87e982
MD5 4f032dc0fedb90a8ad244f56b2811209
BLAKE2b-256 f625d85a111edf58b1b99777039818e64de7200c4441e7cda576a875ba338608

See more details on using hashes here.

File details

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

File metadata

  • Download URL: invrs_opt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f0c26eaab76f224765d92c19036a37555bd59398a0192901c68af2aef507c7ad
MD5 19eb5d43222e43ba2f40210ffe5b807b
BLAKE2b-256 feb9c0a176211fcc09e75ddc8206ad9317976279b02c02aba8c5d56427c8e760

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