tensorflow / tensorflow/tensorboard

Tensorboard 2.21 cannot show backprogation part of keras model (TF 2.2)

Open
#3,644 1 comment 1 reaction 1 assignee View on GitHub

Nobody has claimed this yet.

stat:awaiting tensorflower type:bug
Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

I try the TF 2.2 with Tensorboard. But it cannot show the backprogation part of keras model, and the inputs/outputs/attributes of op node.

tensorboard 2.2.1
tensorflow 2.2.0
Ubuntu18.04

Code:

import tensorflow as tf
import tensorboard

print("tensorflow: ", tf.version.VERSION)
print("tensorboard: ", tensorboard.__version__)

mnist = tf.keras.datasets.mnist

(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train, x_test = x_train / 255.0, x_test / 255.0

print ("input shape: ", x_train.shape)

model = tf.keras.models.Sequential([
  tf.keras.layers.Flatten(input_shape=(28, 28)),
  tf.keras.layers.Dense(128, activation='relu'),
  tf.keras.layers.Dropout(0.2),
  tf.keras.layers.Dense(10)
])

model.summary()

predictions = model(x_train[:1]).numpy()
print (predictions)

loss_fn = tf.keras.losses.SparseCategoricalCrossentropy(from_logits=True)
print (loss_fn(y_train[:1], predictions).numpy())

model.compile(optimizer='adam',
              loss=loss_fn,
              metrics=['accuracy'])

log_dir = "log_mnist_fit"
tensorboard_callback = tf.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)

model.fit(x_train, y_train, epochs=5, callbacks=[tensorboard_callback])

$ tensorboard --logdir log_mnist_fit/train/

When I click the op node, no inputs/outputs for the node in the right-top part!

image

======
I also try tensoboard 2.1.0. It can show the inputs/outputs/attributes of op node. But the backpropagation is still absent.

Thanks in advance!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.