Train a Simple RNN to track a simple shift
In this article, I will explain the way you can code a simple RNN that tracks a simple shift in the pattern
Create Training and Validation Data 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 import numpy as np import re from sklearn.model_selection import train_test_split import tensorflow as tf input_seed = 1234 time_steps = 24 n_samples = 100000 X = np.random.randint(1,30,n_samples*time_steps).reshape(n_samples, time_steps) Y = np.