All Projects → fancompute → Ceviche

fancompute / Ceviche

Licence: mit
🦐 Electromagnetic Simulation + Automatic Differentiation

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Ceviche

Tensorrt Utils
⚡ Useful scripts when using TensorRT
Stars: ✭ 136 (-13.38%)
Mutual labels:  optimization
Georaptor
Python Geohash Compression Tool
Stars: ✭ 143 (-8.92%)
Mutual labels:  optimization
Webdnn
The Fastest DNN Running Framework on Web Browser
Stars: ✭ 1,850 (+1078.34%)
Mutual labels:  optimization
Pygmo2
A Python platform to perform parallel computations of optimisation tasks (global and local) via the asynchronous generalized island model.
Stars: ✭ 134 (-14.65%)
Mutual labels:  optimization
Nlopt.jl
Package to call the NLopt nonlinear-optimization library from the Julia language
Stars: ✭ 141 (-10.19%)
Mutual labels:  optimization
Deep Learning Specialization Coursera
Deep Learning Specialization courses by Andrew Ng, deeplearning.ai
Stars: ✭ 146 (-7.01%)
Mutual labels:  optimization
Search Engine Optimization
🔍 A helpful checklist/collection of Search Engine Optimization (SEO) tips and techniques.
Stars: ✭ 1,798 (+1045.22%)
Mutual labels:  optimization
Galacticoptim.jl
Local, global, and beyond optimization for scientific machine learning (SciML)
Stars: ✭ 155 (-1.27%)
Mutual labels:  optimization
Snappy
snAppy is a VS Code extension coupled with an interactive view to support your React front-end delivery.
Stars: ✭ 144 (-8.28%)
Mutual labels:  optimization
Cosmo.jl
COSMO: Accelerated ADMM-based solver for convex conic optimisation problems (LP, QP, SOCP, SDP, ExpCP, PowCP). Automatic chordal decomposition of sparse semidefinite programs.
Stars: ✭ 149 (-5.1%)
Mutual labels:  optimization
E2e Model Learning
Task-based end-to-end model learning in stochastic optimization
Stars: ✭ 140 (-10.83%)
Mutual labels:  optimization
Soot
Soot - A Java optimization framework
Stars: ✭ 2,049 (+1205.1%)
Mutual labels:  optimization
Evalml
EvalML is an AutoML library written in python.
Stars: ✭ 145 (-7.64%)
Mutual labels:  optimization
Pysot
Surrogate Optimization Toolbox for Python
Stars: ✭ 136 (-13.38%)
Mutual labels:  optimization
Yopo You Only Propagate Once
Code for our nips19 paper: You Only Propagate Once: Accelerating Adversarial Training Via Maximal Principle
Stars: ✭ 152 (-3.18%)
Mutual labels:  optimization
Optimization Python
General optimization (LP, MIP, QP, continuous and discrete optimization etc.) using Python
Stars: ✭ 133 (-15.29%)
Mutual labels:  optimization
Fantasy Basketball
Scraping statistics, predicting NBA player performance with neural networks and boosting algorithms, and optimising lineups for Draft Kings with genetic algorithm. Capstone Project for Machine Learning Engineer Nanodegree by Udacity.
Stars: ✭ 146 (-7.01%)
Mutual labels:  optimization
Mesh Flow Video Stabilization
Online video stabilization using a novel MeshFlow motion model
Stars: ✭ 154 (-1.91%)
Mutual labels:  optimization
Swissarmylib
Collection of helpful utilities we use in our Unity projects.
Stars: ✭ 154 (-1.91%)
Mutual labels:  optimization
Easyengine
Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt
Stars: ✭ 1,881 (+1098.09%)
Mutual labels:  optimization

ceviche Build Status

Electromagnetic Simulation Tools + Automatic Differentiation. Code for paper Forward-Mode Differentiation of Maxwell's Equations.

ceviche

What is ceviche?

ceviche provides two core electromagnetic simulation tools for solving Maxwell's equations:

  • finite-difference frequency-domain (FDFD)

  • finite-difference time-domain (FDTD)

Both are written in numpy / scipy and are compatible with the HIPS autograd package, supporting forward-mode and reverse-mode automatic differentiation.

This allows you to write code to solve your E&M problem, and then use automatic differentiation on your results.

As a result, you can do gradient-based optimization, sensitivity analysis, or plug your E&M solver into a machine learning model without having to go through the tedious process of deriving your derivatives by hand.

Examples

There is a comprehensive ceviche tutorial available at this link with several ipython notebook examples:

  1. Running FDFD simulations in ceviche.
  2. Performing inverse design of a mode converter.
  3. Adding fabrication constraints and device parameterizations.
  4. Inverse design of a wavelength-division multiplexer and advanced topics.

There are also a few examples in the examples/* directory.

Installation

There are many ways to install ceviche.

The easiest is by

pip install ceviche

But to install from a local copy, one can instead do

git clone https://github.com/twhughes/ceviche.git
pip install -e ceviche
pip install -r ceviche/requirements.txt

from the main directory.

Alternatively, just download it:

git clone https://github.com/twhughes/ceviche.git

and then import the package from within your python script

import sys
sys.path.append('path/to/ceviche')

Package Structure

Ceviche

The ceviche directory contains everything needed.

To get the FDFD and FDTD simulators, import directly from ceviche import fdtd, fdfd_ez, fdfd_hz

To get the differentiation, import from ceviche import jacobian.

constants.py contains some constants EPSILON_0, C_0, ETA_0, Q_E, which are needed throughout the package

utils.py contains a few useful functions for plotting, autogradding, and various other things.

optimizers.py contains optimizer functions for doing inverse design.

viz.py are functions that help with plotting fields and sructures.

modes.py contains a mode sorter (WIP) that can be used to create waveguide mode profiles for the simulation, for example.

Examples

There are many demos in the examples directory, which will give you a good sense of how to use the package.

Tests

Tests are located in tests. To run, cd into tests and

python -m unittest

to run all or

python specific_test.py

to run a specific one. Some of these tests involve visual inspection of the field plots rather than error checking on values.

To run all of the gradient checking functions, run

chmod +x test/test_all_gradients.sh
tests/test_all_gradients.sh

Credits

If you use this for your research or work, please cite

@article{hughes2019forward,
  title={Forward-Mode Differentiation of Maxwell’s Equations},
  author={Hughes, Tyler W and Williamson, Ian AD and Minkov, Momchil and Fan, Shanhui},
  journal={ACS Photonics},
  volume={6},
  number={11},
  pages={3010--3016},
  year={2019},
  publisher={ACS Publications}
}

Our logo was created by @nagilmer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].