Skip to content

A simple image generation based on next image prediction with LSTM - MNIST

Notifications You must be signed in to change notification settings

fawern/Sequential-Image-Generator-LSTM-MNIST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Next-Img-Prediction-ImgGeneration-LSTM

A simple image generation based on next image prediction with LSTM - MNIST

Model Architecture

class Model(Sequential):
    def __init__(self, optimizer, X_train, y_train, iters):
        super().__init__()

        self.add(LSTM(128, activation='relu', input_shape=(4, 28*28), return_sequences=True))
        self.add(LSTM(64, activation='relu'))
        self.add(Dense((28*28), activation='linear'))
        self.add(Reshape((28, 28)))

        self.compile(
            optimizer=optimizer, loss='mean_squared_error', metrics=['mse']
        )
        self.fit(X_train, y_train, epochs=iters)

Models output with different optimizers:

model = Model(optimizer='adam', X_train=X_train, y_train=y_train, iters=2)

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

model = generator_model('rmsprop')

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

model = generator_model('adam')

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

rmsprop_output

About

A simple image generation based on next image prediction with LSTM - MNIST

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published