Skip to main content

Algorithms for inverse design

Project description

invrs-opt v0.0.0 - Optimization algorithms for inverse design

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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for invrs_opt-0.0.0.tar.gz
Algorithm Hash digest
SHA256 a1193b7e965c539d3fa1b62b14ad664e1ef4e6a4385afaee0952d60a329f1b06
MD5 7f1be667198742b351f19644a4ff0ab8
BLAKE2b-256 16c5015e428ecca7b91f26b7d55404f73db206a7cdd4943b6f881240daf7e07e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: invrs_opt-0.0.0-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.10.12

File hashes

Hashes for invrs_opt-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 19bdbc4dae07c4bd5a5cf01e9f26f6cd8cf5d5f492dd5535b68b5b566f1b6ec2
MD5 465f24ae6ef32fff4958379070350079
BLAKE2b-256 01f5eef0d367322dd0df165b795caebe2a077287072c466cc9d09e4677d2121f

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