Skip to content

Instantly share code, notes, and snippets.

View waffledunker's full-sized avatar
🎯
Focusing

alpcan iscan waffledunker

🎯
Focusing
View GitHub Profile
@waffledunker
waffledunker / MNIST_Keras2DML.py
Last active September 3, 2020 16:45 — forked from NiloyPurkait/MNIST_Keras2DML.py
An example of using Apache SparkML to train a convolutional neural network in parallel using the MNIST dataset, on IBM watson studio. Written for medium article: https://medium.com/@niloypurkait/how-to-train-your-neural-networks-in-parallel-with-keras-and-apache-spark-ea8a3f48cae6
################################### Keras2DML: Parallely training neural network with SystemML#######################################
import tensorflow as tf
import keras
from keras.models import Sequential
from keras.layers import Input, Dense, Conv1D, Conv2D, MaxPooling2D, Dropout,Flatten
from keras import backend as K
from keras.models import Model
import numpy as np
import matplotlib.pyplot as plt