Search code examples
pythontensorflowneural-network

Is there a way to show activation function in model plots tensorflow ( tf.keras.utils.plot_model() )?


The model plot in TensorFlow shows the shape of input, dtype and layer name. Is there some way to show the type of activation function as well? If there is some other better way of showing/plotting the neural networks please tell.


Solution

  • Updating the tensorflow version solved the 'Error: bad label' issue when setting both show_shapes and show_layer_activation to True for me. (TF Version 2.8.0) Update tensorflow version with

    pip install -U tensorflow
    

    plot model call

    tf.keras.utils.plot_model(model, show_shapes=True, show_layer_activations=True)