GithubHelp home page GithubHelp logo

dopawei / autoke Goto Github PK

View Code? Open in Web Editor NEW

This project forked from menggedu/autoke

0.0 0.0 0.0 956 KB

An automatic knowledge embedding framework for scientific machine learning

Python 100.00%

autoke's Introduction

AutoKE

The PyTorch Source code for An automatic knowledge embedding framework for scientific machine learning.

Instructions

To run the code for conducting the experiments in the paper, follow the script and optional parameters below:

python main.py [--system] [--seed] [--N_f] [--optimizer_name] [--lr] [--xgrid] [--nt] [--u0_str] [--layers] [--epoch-adam] [--activation][--visualize] [--save_model] [--data-path] [--name] [--mode] [--auto] [--pretrain-model-path]

Possible arguments:
--system              system of study (default:rd; also support kdv equation, viscous gravity current(vgc), and new system defined by yourself)
--seed                used to reproduce the results (default: 0)
--N_f                 number of points to sample from the interior domain (default: 1000)
--optimizer_name      optimizer to use, currently supports L-BFGS
--lr                  learning rate (default: 1.0)
--xgrid               size of the xgrid (default: 256)
--nt                  Number of points in the tgrid (default 100)
--u0_str              initial condition (default: 'sin(x)'; also supports 'gauss' for reaction/reaction-diffusion)
--layers              number of layers in the network (default: '50,50,50,50,1')
--epoch-adam          epoch numbers for adam optimizer (default:10000)
--activation          activation for the network (default: 'tanh')
--visualize           option to visualize the solution (default: False)
--save_model          option to save the model (default: False)
--data-path           path of data
--name                job name 
--mode                mode of the NN (default: traing; also support "test"  and "pretrain")
--auto                option to implement physical constraints automatically (default: False)
--pretrain-model-path checkpoint path for pretraining

Example

For solving the KdV equation, you need to write a JSON format configuration file in accordance with the prescribed format. See kdv.json in folder config/. It contains the system name, ASCII representation of the equaiton, and some subcomponents for the equation.

Training scripts:

python main.py --system kdv --layers 2,128,128,128,128,128,128,1 --mode train --name kdv --epoch-adam 20000 --auto  

To be updated:

New features and cases

Reference resources

https://github.com/tensordiffeq/TensorDiffEq
https://github.com/a1k12/characterizing-pinns-failure-modes

autoke's People

Contributors

menggedu avatar

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.