Skip to content

Instantly share code, notes, and snippets.

@bharatc9530
Created August 4, 2020 08:40
Show Gist options
  • Save bharatc9530/916b924d64472cb2b51a629d435fe92f to your computer and use it in GitHub Desktop.
Save bharatc9530/916b924d64472cb2b51a629d435fe92f to your computer and use it in GitHub Desktop.
model = Sequential()
model.add(Embedding(vocab_size, 8, input_length=max_length))
model.add(Flatten())
model.add(Dense(1, activation='sigmoid'))
model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['acc'])
print(model.summary())
model.fit(X_train, y_train, epochs=20, verbose=0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment