Skip to content
/ RNNs Public

Realize RNNs model (RNN, LSTM, GRU) for sequence prediction based on Pytorch.

Notifications You must be signed in to change notification settings

j1o2h3n/RNNs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RNNs

Realize RNNs series models based on Pytorch, and perform sequence prediction tasks. I did not call the original library functions,and I implemented three deep learning models of RNN, LSTM, and GRU by hand.

The code implements three models of RNN, LSTM, and GRU. The experimental task is to predict traffic flow sequence. The experimental data set is PEMS08, a total of 170 observation nodes, 17856 time frames, one frame is recorded every five minutes, and 12 frames of historical data are used to predict 12 frames of future data. The PEMS08 data set is divided into training set, validation set, and test set according to the ratio of 6:2:2.

Molde

The overall model is mainly composed of input layer + two RNNs layers + output layer.

Requirements

  • python 3
  • numpy
  • torch

Train Commands

python train.py --Flag

Select the model used for training by selecting Flag. The options provided are RNN/LSTM/GRU, and the default is GRU.

About

Realize RNNs model (RNN, LSTM, GRU) for sequence prediction based on Pytorch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages