Created
May 31, 2019 19:32
-
-
Save iamsurya/71aeaf46a1a501239f5ab677b0c78503 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import keras | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, Flatten, Reshape | |
from keras.layers import Conv1D, MaxPooling1D | |
from keras.utils import np_utils | |
TIME_PERIODS = 21 # Number of steps in a time series sample | |
model = Sequential() | |
model.add(Dense(100, activation='relu', input_shape=(21,))) | |
model.add(Dense(1, activation='sigmoid')) | |
print(model.summary()) | |
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy']) | |
BATCH_SIZE = 100 | |
EPOCHS = 5 | |
history = model.fit(normdata, | |
labels, | |
batch_size=BATCH_SIZE, | |
epochs=EPOCHS, | |
validation_split=0.8, | |
verbose=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment