• Stars
    star
    256
  • Rank 159,219 (Top 4 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

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

More Repositories

1

Date2Vec

PyTorch Scripts for training and getting embeddings of Date-Time without losing much information. Pretrained Models Included.
Python
52
star
2

SmoothedGradientDescentAscent

An Implementation of Smoothed Gradient Descent-Ascent (NeurIPS 2020) and a variant of the algorithm.
Python
7
star
3

AttentionEntropy

Applying Principle of Least Action to Transformers to make them data efficient
Python
3
star
4

StyleTransfer

Neural Style transfer using a small autoencoder
Python
3
star
5

PyRFF

Random Feature Extraction with Numpy
Python
2
star
6

NotChess

Chess but with a Twist.
Python
2
star
7

Internet-ads-Classification

Cleaning, training and testing classifier on UCI Machine Learning Dataset - Internet Ads
Python
2
star
8

Drug-Protein-Interaction-ML

This Repo contains 1D Convolution Based Model for Drug-Protein Interaction Prediction problem.
2
star
9

Emotion_detection

Detection emotions with multimodal inputs (Audio-Video) using Mixture of Experts of ResNet Features + CNN (Video) and LSTM (Audio)
Python
2
star
10

LearningInitializations

An attempt at making a model learn how to initialize other models to reduce training time/error.
Python
1
star
11

WordGuesser

Guessing the word given an incomplete word and its description
Python
1
star
12

MyMusicTransformer

RLHF + MusicTransformer = Generate the music YOU love
Python
1
star
13

DL3-Deep-Network

Building an image classifier on animal images using Keras and pretrained CNN GoogleInceptionV3 on ImageNet dataset in an online competition.
Python
1
star
14

Landscape_ProGAN

Learning to generate landscape paintings / photographs using ProGAN, with Image crawler python script
Python
1
star