Skip to content

Instantly share code, notes, and snippets.

@prabindh
Created May 17, 2019 03:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save prabindh/819a89e2232f2a864597156ff23f089d to your computer and use it in GitHub Desktop.
Save prabindh/819a89e2232f2a864597156ff23f089d to your computer and use it in GitHub Desktop.
spike checker
# conv1d for timeseries spike
model = models.Sequential()
model.add(layers.Conv1D(filters = 1,
kernel_size = 10,
activation = 'relu',
input_shape=(timesteps,1)))
model.add(layers.GlobalMaxPooling1D())
model.add(layers.Flatten())
model.add(layers.Dense(1, activation = 'sigmoid'))
model.compile(optimizer = 'rmsprop',
loss = 'binary_crossentropy',
metrics = ['accuracy'])
network = model.fit(x, y[:,0],
epochs = 20,
batch_size = 32,
shuffle = True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment