Skip to content

Instantly share code, notes, and snippets.

View mohneesh7's full-sized avatar

Mohneesh S mohneesh7

  • Nuzvid
View GitHub Profile
@mohneesh7
mohneesh7 / LSTM_mnist.py
Last active October 21, 2020 07:06
LSTM using MNIST Data
import tensorflow.keras as keras
from tensorflow.keras.datasets import mnist
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Dropout, LSTM
from tensorflow.keras.optimizers import Adam
from tensorflow.compat.v1.keras.layers import CuDNNLSTM
#Importing the data
(X_train, y_train),(X_test, y_test) = mnist.load_data() # unpacks images to x_train/x_test and labels to y_train/y_test
#Normalizing the data