Code Monkey home page Code Monkey logo

deepadjoint_ml-optimization_integration's Introduction

ML-Optimization Integration (DeepAdjoint)

Requirements

The following software is required to run the provided scripts. As of this writing, the versions below have been tested and verified.

-Python 3.6.8

-Pytorch 1.9.0

Installation instructions for Pytorch (with CUDA) are at: https://pytorch.org/. For convenience, here are installation commands for the Conda distribution (after installing Anaconda: https://www.anaconda.com/products/individual).

conda create -n myenv python=3.6.8
conda activate myenv
conda install pytorch torchvision torchaudio cudatoolkit=10.2 -c pytorch
conda install -c anaconda opencv
conda install -c anaconda scipy
conda install matplotlib
conda install pandas
conda install spyder

Running App in MATLAB

Prerequisites

If running Lumerical 2020_R2 and the Integration tool in MATLAB:

  1. Before launching MATLAB set the path in powershell/cmd: PATH=C:\Program Files\Lumerical\v202\bin;%PATH%
  2. Then launch matlab from cmd (will not work if not launched from cmd): matlab

Reference: https://support.lumerical.com/hc/en-us/articles/360034407914-appopen

Steps

  1. Run 'ML_Opt.mlapp' in MATLAB AppDesigner.
  2. Update 'Path' environment variable to '...\myenv\Library\bin' directory. Ex: 'C:\Users\cyyeu\anaconda3\envs\myenv\Library\bin'
  3. Set Preferences:

3.1) Path to python executable with above modules installed. Spaces between slashes need to be wrapped with double-quotes. Ex: 'C:/Users/cyyeu/anaconda3/envs/myenv/python'

3.2) Path to working directory with downloaded Lumerical files. Spaces between slashes need to be wrapped with double-quotes. Ex: 'C:/Users/cyyeu/Documents/ML-Optimization_Integration'

3.3) Path to Lumerical MATLAB api directory. Ex. 'C:/Program Files/Lumerical/v202/api/matlab'

  1. Use a GAN file for integration with DeepAdjoint. You can train your own GAN using the following repo: https://github.com/Raman-Lab-UCLA/Multiclass_Metasurface_InverseDesign, or download our trained GAN here: https://drive.google.com/drive/folders/1VWaH6JUx36FPzz7rm_nU2_vWC15xoDD6?usp=sharing

  2. Follow demo here:

DeepAdjoint_Demo.mp4

deepadjoint_ml-optimization_integration's People

Contributors

cyyeung1234 avatar phamb584 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepadjoint_ml-optimization_integration's Issues

.pt File

Hello,

This seems like a great Framework! I am trying to go through the example, however it seems the repo is missing the .pt file. Is this intended? Are there any specifications on what sort of model architecture can be input?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.