how to use tensorboard with tensorflow code example

Example: how to use tensorboard

import datetime
from tensorflow.keras.callbacks import TensorBoard

# Set Folder for saving logs
logDir = "logs/13-500Feature/" + datetime.datetime.now().strftime("%Y%m%d-%H%M%S") #If you are using linux
print("logDir: ", logDir)

# Train your model
model.fit(x_train, y_train, batch_size=32, epochs=100,
         validation_data=(x_test, y_test),
         verbose=1,
         callbacks = [tensorboard_callback])   # Use Checkpoint callback
                                                    
# Use In jupyter notebook or Google Colab

%load_ext tensorboard
%tensorboard --logdir logs