Skip to main content

Algorithms for inverse design

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

invrs-opt - Optimization algorithms for inverse design

Continuous integration PyPI version

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

invrs_opt-0.10.3-py3-none-any.whl (50.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: invrs_opt-0.10.3.tar.gz
  • Upload date:
  • Size: 46.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for invrs_opt-0.10.3.tar.gz
Algorithm Hash digest
SHA256 9136c8e8296db90e49568646b55293431deec04aa4dd8f2860f1c0dcf3099e34
MD5 eacf61b22db0b5be3cab36889398bbbb
BLAKE2b-256 f0e870ccbb35a40d2c0ec56b7c464ac3ec6f2bc23df156b1889ea040b478ac9f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: invrs_opt-0.10.3-py3-none-any.whl
  • Upload date:
  • Size: 50.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for invrs_opt-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f72baa386d183dbdd8a10018efd4f99ea9209a333fdeda6915ccad9a5b6e5c46
MD5 ca7594f559695d52d5ea43e68fe3feb6
BLAKE2b-256 7d0725b5ee3c7e8702956a30c9fbaf7d7ff3673fa907524305802870e1d1acab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page