Giter VIP home page Giter VIP logo

cst's Introduction

Continuous Spatiotemporal Transformers

Pytorch implementation of the Continuous Spatiotemporal Transformers (CST)

Quickstart

Clone this repository locally:

git clone https://github.com/ahof1704/CST.git

Create an Anaconda environment from the cst.yml file using:

conda env create --file cst.yml
conda activate cst

If you use CST or any part of it in your own work, please cite Fonseca et al:

@article{fonseca2023continuous,
  title={Continuous Spatiotemporal Transformers},
  author={Fonseca, Antonio H de O and Zappala, Emanuele and Caro, Josue Ortega and van Dijk, David},
  journal={arXiv preprint arXiv:2301.13338},
  year={2023}
}

Datasets

Toy data

The toy data has been obtained by solving analytical IDEs in 2D and 4Ds. The kernels used in both cases were convolutional kernels where the entries were given by combinations of trigonometric functions. The F function was a hyperbolic cosine. To obtain the datasets, we have randomly sampled initial conditions and solved the corresponding initial value problem for the IDEs, using our implementation of the IDE solver. The integrals have been performed with Monte-Carlo integration with 1K sampled points per interval, and the number of iterations used was set to 10, which was empirically seen to guarantee convergence to the solution.

The scripts for the toy data generation can be found here.

Tutorial

For an example on how to use CST to model dynamics, consult this notebook in which CST is used to model the toy dataset described above.

Manual Environment Creation

If the cst.yml file does not successfully recreate the environment for you, you can follow the below steps to install the major packages needed for this project:

  1. Create and activate an anaconda environment with Python version 3.8:
conda create -n cst python=3.8
conda activate cst
  1. Install Pytorch: conda install pytorch==1.12.0 torchvision==0.13.0 cudatoolkit=11.3 -c pytorch

  2. Install Matplotlib: conda install -c conda-forge matplotlib

  3. Install pip install git+https://github.com/patrick-kidger/torchcubicspline.git

  4. Install conda install -c anaconda scipy

  5. Install conda install -c conda-forge torchdiffeq

  6. Install conda install -c conda-forge tqdm

  7. Install conda install -c anaconda scikit-learn

cst's People

Contributors

ahof1704 avatar

Watchers

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