All Projects → google-research → Torchsde

google-research / Torchsde

Licence: apache-2.0
Differentiable SDE solvers with GPU support and efficient sensitivity analysis.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Torchsde

Awesome Deep Learning Papers
The most cited deep learning papers
Stars: ✭ 23,410 (+3352.8%)
Mutual labels:  deep-neural-networks
Deeppavlov
An open source library for deep learning end-to-end dialog systems and chatbots.
Stars: ✭ 5,525 (+714.9%)
Mutual labels:  deep-neural-networks
Mnn
MNN is a blazing fast, lightweight deep learning framework, battle-tested by business-critical use cases in Alibaba
Stars: ✭ 6,284 (+826.84%)
Mutual labels:  deep-neural-networks
Awesome Emdl
Embedded and mobile deep learning research resources
Stars: ✭ 554 (-18.29%)
Mutual labels:  deep-neural-networks
Tez
Tez is a super-simple and lightweight Trainer for PyTorch. It also comes with many utils that you can use to tackle over 90% of deep learning projects in PyTorch.
Stars: ✭ 580 (-14.45%)
Mutual labels:  deep-neural-networks
Stock Analysis Engine
Backtest 1000s of minute-by-minute trading algorithms for training AI with automated pricing data from: IEX, Tradier and FinViz. Datasets and trading performance automatically published to S3 for building AI training datasets for teaching DNNs how to trade. Runs on Kubernetes and docker-compose. >150 million trading history rows generated from +5000 algorithms. Heads up: Yahoo's Finance API was disabled on 2019-01-03 https://developer.yahoo.com/yql/
Stars: ✭ 605 (-10.77%)
Mutual labels:  deep-neural-networks
Refinenet
RefineNet: Multi-Path Refinement Networks for High-Resolution Semantic Segmentation
Stars: ✭ 543 (-19.91%)
Mutual labels:  deep-neural-networks
Adversarial video generation
A TensorFlow Implementation of "Deep Multi-Scale Video Prediction Beyond Mean Square Error" by Mathieu, Couprie & LeCun.
Stars: ✭ 662 (-2.36%)
Mutual labels:  deep-neural-networks
Vehicle counting tensorflow
🚘 "MORE THAN VEHICLE COUNTING!" This project provides prediction for speed, color and size of the vehicles with TensorFlow Object Counting API.
Stars: ✭ 582 (-14.16%)
Mutual labels:  deep-neural-networks
Ffdl
Fabric for Deep Learning (FfDL, pronounced fiddle) is a Deep Learning Platform offering TensorFlow, Caffe, PyTorch etc. as a Service on Kubernetes
Stars: ✭ 640 (-5.6%)
Mutual labels:  deep-neural-networks
Serving
A flexible, high-performance serving system for machine learning models
Stars: ✭ 5,306 (+682.6%)
Mutual labels:  deep-neural-networks
Wdsr ntire2018
Code of our winning entry to NTIRE super-resolution challenge, CVPR 2018
Stars: ✭ 570 (-15.93%)
Mutual labels:  deep-neural-networks
Deeplearning.ai
deeplearning.ai , By Andrew Ng, All video link
Stars: ✭ 625 (-7.82%)
Mutual labels:  deep-neural-networks
Papers
📎 Summaries of papers on deep learning
Stars: ✭ 553 (-18.44%)
Mutual labels:  deep-neural-networks
Saliency
TensorFlow implementation for SmoothGrad, Grad-CAM, Guided backprop, Integrated Gradients and other saliency techniques
Stars: ✭ 648 (-4.42%)
Mutual labels:  deep-neural-networks
Trending Deep Learning
Top 100 trending deep learning repositories sorted by the number of stars gained on a specific day.
Stars: ✭ 543 (-19.91%)
Mutual labels:  deep-neural-networks
Pix2pixhd
Synthesizing and manipulating 2048x1024 images with conditional GANs
Stars: ✭ 5,553 (+719.03%)
Mutual labels:  deep-neural-networks
Neupy
NeuPy is a Tensorflow based python library for prototyping and building neural networks
Stars: ✭ 670 (-1.18%)
Mutual labels:  deep-neural-networks
Segan
Speech Enhancement Generative Adversarial Network in TensorFlow
Stars: ✭ 661 (-2.51%)
Mutual labels:  deep-neural-networks
Speech Emotion Analyzer
The neural network model is capable of detecting five different male/female emotions from audio speeches. (Deep Learning, NLP, Python)
Stars: ✭ 633 (-6.64%)
Mutual labels:  deep-neural-networks

PyTorch Implementation of Differentiable SDE Solvers Python package

This library provides stochastic differential equation (SDE) solvers with GPU support and efficient backpropagation.


Installation

pip install git+https://github.com/google-research/torchsde.git

Requirements: Python >=3.6 and PyTorch >=1.6.0.

Documentation

Available here.

Examples

Quick example

import torch
import torchsde

batch_size, state_size, brownian_size = 32, 3, 2
t_size = 20

class SDE(torch.nn.Module):
    noise_type = 'general'
    sde_type = 'ito'

    def __init__(self):
        super().__init__()
        self.mu = torch.nn.Linear(state_size, 
                                  state_size)
        self.sigma = torch.nn.Linear(state_size, 
                                     state_size * brownian_size)

    # Drift
    def f(self, t, y):
        return self.mu(y)  # shape (batch_size, state_size)

    # Diffusion
    def g(self, t, y):
        return self.sigma(y).view(batch_size, 
                                  state_size, 
                                  brownian_size)

sde = SDE()
y0 = torch.full((batch_size, state_size), 0.1)
ts = torch.linspace(0, 1, t_size)
# Initial state y0, the SDE is solved over the interval [ts[0], ts[-1]].
# ys will have shape (t_size, batch_size, state_size)
ys = torchsde.sdeint(sde, y0, ts)

Notebook

examples/demo.ipynb gives a short guide on how to solve SDEs, including subtle points such as fixing the randomness in the solver and the choice of noise types.

Latent SDE

examples/latent_sde.py learns a latent stochastic differential equation, as in Section 5 of [1]. The example fits an SDE to data, whilst regularizing it to be like an Ornstein-Uhlenbeck prior process. The model can be loosely viewed as a variational autoencoder with its prior and approximate posterior being SDEs. This example can be run via

python -m examples.latent_sde --train-dir <TRAIN_DIR>

The program outputs figures to the path specified by <TRAIN_DIR>. Training should stabilize after 500 iterations with the default hyperparameters.

Neural SDEs as GANs

examples/sde_gan.py learns an SDE as a GAN, as in [2]. The example trains an SDE as the generator of a GAN, whilst using a neural CDE [3] as the discriminator. This example can be run via

python -m examples.sde_gan

Citation

If you found this codebase useful in your research, please consider citing either or both of:

@article{li2020scalable,
  title={Scalable gradients for stochastic differential equations},
  author={Li, Xuechen and Wong, Ting-Kam Leonard and Chen, Ricky T. Q. and Duvenaud, David},
  journal={International Conference on Artificial Intelligence and Statistics},
  year={2020}
}
@article{kidger2020neuralsde,
  title={Neural {SDE}s {M}ade {E}asy: {SDE}s are {I}nfinite-{D}imensional {GAN}s},
  author={Kidger, Patrick and Foster, James and Li, Xuechen and Oberhauser, Harald and Lyons, Terry},
  journal={arXiv:2102.03657},
  year={2021}
}

References

[1] Xuechen Li, Ting-Kam Leonard Wong, Ricky T. Q. Chen, David Duvenaud. "Scalable Gradients for Stochastic Differential Equations". International Conference on Artificial Intelligence and Statistics. 2020. [arXiv]

[2] Patrick Kidger, James Foster, Xuechen Li, Harald Oberhauser, Terry Lyons. "Neural SDEs as Infinite-Dimensional GANs". Machine Learning and the Physical Sciences, NeurIPS 2020 [arXiv]

[3] Patrick Kidger, James Morrill, James Foster, Terry Lyons, "Neural Controlled Differential Equations for Irregular Time Series". Neural Information Processing Systems 2020. [arXiv]


This is a research project, not an official Google product.

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].