An open API service indexing awesome lists of open source software.

https://github.com/andrewrgarcia/time2vec

Time2Vec neural network components. From paper: "Time2Vec: Learning a Vector Representation of Time" - https://arxiv.org/pdf/1907.05321.pdf
https://github.com/andrewrgarcia/time2vec

keras-tensorflow layers neural-networks representation-learning time-encoding time-series torch

Last synced: 9 months ago
JSON representation

Time2Vec neural network components. From paper: "Time2Vec: Learning a Vector Representation of Time" - https://arxiv.org/pdf/1907.05321.pdf

Awesome Lists containing this project

README

          

# Time2Vec in Keras and Torch

My implementation of [Time2Vec: Learning a Vector representation of Time](https://arxiv.org/abs/1907.05321) as Keras and PyTorch Layers.

# How to Use It

**Head straight to our [Time2Vec Usage Template in Google Colab](https://colab.research.google.com/drive/1P2BOAaQlo54SqYCsL8FFq1PffDjQuO1F?usp=sharing)**

# The Concept

Time2Vec offers a versatile representation of time with three fundamental properties. It encapsulates scalar notion of time $\tau$, in $\mathbf{t2v}(\tau)$,
a vector of size k + 1. This transformation, for an $i^{th}$ element of $\mathbf{t2v}$, is defined as follows:

```math
\mathbf{t2v}(\tau)[i] =
\begin{cases}
\omega_i \tau + \phi_i, & \mathrm{if} & i = 0.\\
\mathcal{F}(\omega_i \tau + \phi_i), & \mathrm{if} & 1 \leq i \leq k.
\end{cases}
```
The above incorporates a periodic activation function denoted as $\mathcal{F}$, and involves learnable parameters $\omega_i$ and $\phi_i$ [[1]](https://arxiv.org/abs/1907.05321).

# Reference

1. Seyed Mehran Kazemi, Rishab Goel, Sepehr Eghbali, Janahan Ramanan, Jaspreet Sahota, Sanjay Thakur, Stella Wu, Cathal Smyth, Pascal Poupart, Marcus Brubaker. "Time2Vec: Learning a Vector Representation of Time." arXiv:1907.05321 [cs.LG], 11 Jul 2019. [Link](https://arxiv.org/abs/1907.05321)