Skip to content

Instantly share code, notes, and snippets.

Created June 7, 2019 14:40
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
train_on_weight= np.array([1,1,0])
print("Now we won't do any fancy preprocessing, just basic training.")
graph_conv_filters = A # you may try np.eye(3)
graph_conv_filters = K.constant(graph_conv_filters)
model = Sequential()
model.add(GraphCNN(Y.shape[1], NUM_FILTERS, graph_conv_filters, input_shape=(X.shape[1],), activation='elu', kernel_regularizer=l2(5e-4)))
model.compile(loss='categorical_crossentropy', optimizer=Adam(lr=0.01), metrics=['acc'])
model.summary(), Y, batch_size=A.shape[0], sample_weight=train_on_weight, epochs=200, shuffle=False, verbose=0)
Y_pred = model.predict(X, batch_size=A.shape[0])
print(np.argmax(Y_pred, axis=1))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment