Last active
November 16, 2020 02:21
-
-
Save pritul2/f91f1074a1de8366970effc6a760287e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Convert singular value of y to one hot encoding# | |
from tensorflow.keras.utils import to_categorical | |
y_train_encoded = to_categorical(y_train) | |
y_test_encoded = to_categorical(y_test) | |
#Visualize the keras model# | |
from tensorflow.keras.utils import plot_model | |
from IPython.display import Image | |
plot_model(model, to_file='model.png', show_shapes=True, show_layer_names=True,rankdir='LR',dpi=96)#change rankdir='TB' for horizontal plot | |
Image('model.png') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment