Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- X_res, y_res, X_test, y_test = generate_train_test_sample(X, y)
- X_res = np.expand_dims(X_res, axis=0)
- print X_res.shape
- seed(2017)
- conv = Sequential()
- conv.add(Conv1D(2, 2, input_shape=(29, 1), activation='relu'))
- conv.add(MaxPooling1D(2))
- conv.add(Flatten())
- conv.add(Dense(300, activation = 'relu'))
- sgd = SGD(lr = 0.1, momentum = 0.9, decay = 0, nesterov = False)
- conv.compile(loss = 'binary_crossentropy', optimizer = sgd, metrics =['accuracy'])
- conv.fit(X_res, y_res, batch_size = 500, epochs = 15, verbose = 50)
Add Comment
Please, Sign In to add comment