Tensorflow Keras in Coding

After the session of data processing, vectorization, next step is to grasp settings of Keras and put it into real MLoPs. Following Google tech’s official instructions.

In summary, tokenization, embedding is the preprocessing steps. Embedding is very well explained by Andrew Ng and documented in previous blog. Reflected on Keras codes:

optimizer could be rnsprop, if use adam optimizer, learning_rate = 0.0001 can also be set. loss function can be binary_crossentropy, or be sparse_categorical_crossentropy.

to train/fit model, parameters can include batch_size=10, epochs=30, shuffle=True, verbose=2. verbose setting is to view the output with more details or not. validation_split=0.1 which include validation dataset to evaluate if the model is overfitting with high variance or underfitting high-biased.

How to evaluate the model, we Create a Confusion Matrix for Neural Network Predictions

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.