Sparse Physics-based and Interpretable Neural Networks

Related tags

Deep LearningSPINN
Overview

Sparse Physics-based and Interpretable Neural Networks for PDEs

This repository contains the code and manuscript for research done on Sparse Physics-based and Interpretable Neural Networks for PDEs. More details are available in the following publication:

  • Amuthan A. Ramabathiran and Prabhu Ramachandran^, "SPINN: Sparse, Physics-based, and partially Interpretable Neural Networks for PDEs", Journal of Computational Physics, Volume 445, pages 110600, 2021 doi:10.1016/j.jcp.2021.110600. (^ Joint first author). arXiv:2102.13037.

Installation

Running the code in this repository requires a few pre-requisites to be set up. The Python packages required are in the requirements.txt. Here are some instructions to help you set these up:

  1. Setup a suitable Python distribution, using conda or a virtualenv.

  2. Clone this repository:

    $ git clone https://github.com/nn4pde/SPINN.git
    $ cd SPINN
  1. If you use conda, run the following from your Python environment:
    $ conda env create -f environment.yml
    $ conda activate spinn
  1. If you use a virtualenv or some other Python distribution and wish to use pip:
    $ pip install -r requirements.txt

Once you install the packages you should hopefully be able to run the examples. The examples all support live-plotting of the results. Matplotlib is required for the live plotting of any of the 1D problems and Mayavi is needed for any 2D/3D problems. These are already specified in the requirements.txt and environments.yml files.

Running the code

All the problems discussed in the paper are available in the code subdirectory. The supplementary text in the paper discusses the design of the code at a very high level. You can run any of the problems as follows:

  $ cd code
  $ python ode3.py -h

And this will provide a variety of help options that you can use. You can see the results live by doing:

  $ python ode3.py --plot

These require matlplotlib.

The 2D problems also feature live plotting with Mayavi if it is installed, for example:

  $ python advection1d.py --plot

You should see the solution as well as the computational nodes. Where applicable you can see an exact solution as a wireframe.

If you have a GPU and it is configured to work with PyTorch, you can use it like so:

  $ python poisson2d_irreg_dom.py --gpu

Generating the results

All the results shown in the paper are automated using the automan package which should already be installed as part of the above installation. This will perform all the required simulations (this can take a while) and also generate all the plots for the manuscript.

To learn how to use the automation, do this:

    $ python automate.py -h

By default the simulation outputs are in the outputs directory and the final plots for the paper are in manuscript/figures.

To generate all the figures in one go, run the following (this will take a while):

    $ python automate.py

If you wish to only run a particular set of problems and see those results you can do the following:

   $ python automate.py PROBLEM

where PROBLEM can be any of the demonstrated problems. For example:

  $ python automate.py ode1 heat cavity

Will only run those three problems. Please see the help output (-h) and look at the code for more details.

By default we do not need to use a GPU for the automation but if you have one, you can edit the automate.py and set USE_GPU = True to make use of your GPU where possible.

Building the paper

Once you have generated all the figures from the automation you can easily compile the manuscript. The manuscript is written with LaTeX and if you have that installed you may do the following:

$ cd manuscript
$ latexmk spinn_manuscript.tex -pdf
An Evaluation of Generative Adversarial Networks for Collaborative Filtering.

An Evaluation of Generative Adversarial Networks for Collaborative Filtering. This repository was developed by Fernando B. Pérez Maurera. Fernando is

Fernando Benjamín PÉREZ MAURERA 0 Jan 19, 2022
'A C2C E-COMMERCE TRUST MODEL BASED ON REPUTATION' Python implementation

Project description A library providing functionalities to calculate reputation and degree of trust on C2C ecommerce platforms. The work is fully base

Davide Bigotti 2 Dec 14, 2022
Deep Learning (with PyTorch)

Deep Learning (with PyTorch) This notebook repository now has a companion website, where all the course material can be found in video and textual for

Alfredo Canziani 6.2k Jan 07, 2023
95.47% on CIFAR10 with PyTorch

Train CIFAR10 with PyTorch I'm playing with PyTorch on the CIFAR10 dataset. Prerequisites Python 3.6+ PyTorch 1.0+ Training # Start training with: py

5k Dec 30, 2022
for taichi voxel-challange event

Taichi Voxel Challenge Figure: result of python3 example6.py. Please replace the image above (demo.jpg) with yours, so that other people can immediate

Liming Xu 20 Nov 26, 2022
Graph Convolutional Neural Networks with Data-driven Graph Filter (GCNN-DDGF)

Graph Convolutional Gated Recurrent Neural Network (GCGRNN) Improved from Graph Convolutional Neural Networks with Data-driven Graph Filter (GCNN-DDGF

Lei Lin 21 Dec 18, 2022
Python PID Tuner - Based on a FOPDT model obtained using a Open Loop Process Reaction Curve

PythonPID_Tuner Step 1: Takes a Process Reaction Curve in csv format - assumes data at 100ms interval (column names CV and PV) Step 2: Makes a rough e

6 Jan 14, 2022
Fine-grained Control of Image Caption Generation with Abstract Scene Graphs

Faster R-CNN pretrained on VisualGenome This repository modifies maskrcnn-benchmark for object detection and attribute prediction on VisualGenome data

Shizhe Chen 7 Apr 20, 2021
CTRL-C: Camera calibration TRansformer with Line-Classification

CTRL-C: Camera calibration TRansformer with Line-Classification This repository contains the official code and pretrained models for CTRL-C (Camera ca

57 Nov 14, 2022
Official repo for AutoInt: Automatic Integration for Fast Neural Volume Rendering in CVPR 2021

AutoInt: Automatic Integration for Fast Neural Volume Rendering CVPR 2021 Project Page | Video | Paper PyTorch implementation of automatic integration

Stanford Computational Imaging Lab 149 Dec 22, 2022
验证码识别 深度学习 tensorflow 神经网络

captcha_tf2 验证码识别 深度学习 tensorflow 神经网络 使用卷积神经网络,对字符,数字类型验证码进行识别,tensorflow使用2.0以上 目前项目还在更新中,诸多bug,欢迎提出issue和PR, 希望和你一起共同完善项目。 实例demo 训练过程 优化器选择: Adam

5 Apr 28, 2022
PyTorch code for Vision Transformers training with the Self-Supervised learning method DINO

Self-Supervised Vision Transformers with DINO PyTorch implementation and pretrained models for DINO. For details, see Emerging Properties in Self-Supe

Facebook Research 4.2k Jan 03, 2023
Official pytorch implementation of the AAAI 2021 paper Semantic Grouping Network for Video Captioning

Semantic Grouping Network for Video Captioning Hobin Ryu, Sunghun Kang, Haeyong Kang, and Chang D. Yoo. AAAI 2021. [arxiv] Environment Ubuntu 16.04 CU

Hobin Ryu 43 Nov 25, 2022
Semantically Contrastive Learning for Low-light Image Enhancement

Semantically Contrastive Learning for Low-light Image Enhancement Here, we propose an effective semantically contrastive learning paradigm for Low-lig

48 Dec 16, 2022
A modular, research-friendly framework for high-performance and inference of sequence models at many scales

T5X T5X is a modular, composable, research-friendly framework for high-performance, configurable, self-service training, evaluation, and inference of

Google Research 1.1k Jan 08, 2023
CAPRI: Context-Aware Interpretable Point-of-Interest Recommendation Framework

CAPRI: Context-Aware Interpretable Point-of-Interest Recommendation Framework This repository contains a framework for Recommender Systems (RecSys), a

RecSys Lab 8 Jul 03, 2022
AttGAN: Facial Attribute Editing by Only Changing What You Want (IEEE TIP 2019)

News 11 Jan 2020: We clean up the code to make it more readable! The old version is here: v1. AttGAN TIP Nov. 2019, arXiv Nov. 2017 TensorFlow impleme

Zhenliang He 568 Dec 14, 2022
LETR: Line Segment Detection Using Transformers without Edges

LETR: Line Segment Detection Using Transformers without Edges Introduction This repository contains the official code and pretrained models for Line S

mlpc-ucsd 157 Jan 06, 2023
Facebook AI Image Similarity Challenge: Descriptor Track

Facebook AI Image Similarity Challenge: Descriptor Track This repository contains the code for our solution to the Facebook AI Image Similarity Challe

Sergio MP 17 Dec 14, 2022
Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network

Efficient and Accurate Arbitrary-Shaped Text Detection with Pixel Aggregation Network Paddle-PANet 目录 结果对比 论文介绍 快速安装 结果对比 CTW1500 Method Backbone Fine

7 Aug 08, 2022