Created
May 17, 2019 03:56
-
-
Save prabindh/819a89e2232f2a864597156ff23f089d to your computer and use it in GitHub Desktop.
spike checker
This file contains hidden or 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
# 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