Giter Site home page Giter Site logo

zhonghaoaustin / time2vec-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ojus1/time2vec-pytorch

0.0 0.0 0.0 28 KB

Reproducing the paper: "Time2Vec: Learning a Vector Representation of Time" - https://arxiv.org/pdf/1907.05321.pdf

License: MIT License

Python 100.00%

time2vec-pytorch's Introduction

Time2Vec: Learning a Vector representation of Time

This is an attempt of reproducing the paper "Time2Vec: Learning a Vector Representation of Time" in PyTorch. For Pretrained model and package to encode ISO Date-Time to vectors, please check Date2Vec which uses this package to implement the above functionality.

Summary

Popular activation functions are unable to capture periodicity of the input, hence they cannot capture the periodic nature of Time and Dates.

Gradients of Activations like ReLU, Softmax, Sigmoid etc. either explode or plateu due to the input continuosly growing.

Currently, a synthesized dataset of integers is used to test the functionality of the proposed method.

I plan to add more experiments to this repository.

Prerequisites

PyTorch (Tested on PyTorch 1.1 on Python 3.6)

Steps for running experiments:

1. Clone this repository, and change the directory to the folder.
2. To start training, In a command line, enter: "python3 experiment.py"
3. To use the Periodic Activation layers in your projects, copy the file "periodic_activations.py" and import: 
    "from periodic_activations import SineActivation"

To-Do

1. Adding experiments on popular datasets
2. Adding couple of Periodic activations like Triangle function and Modulo
3. Adding comparisons to Aperiodic activations.

Authors

*Surya Kant Sahu - ojus1

License

This project is licensed under the MIT License - LICENSE.md

Acknowledgments

time2vec-pytorch's People

Contributors

ojus1 avatar anirudh257 avatar instigatorofawe 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.