tensorboard icon indicating copy to clipboard operation
tensorboard copied to clipboard

Graph display missing dataflow edges when specifying multiple input tensors from the same node

Open raphCode opened this issue 1 year ago • 0 comments

Environment information (required)

--- check: autoidentify
INFO: diagnose_tensorboard.py version df7af2c6fc0e4c4a5b47aeae078bc7ad95777ffa

--- check: installed_packages
INFO: installed: tensorboard==2.12.0
WARNING: no installation among: ['tensorflow', 'tensorflow-gpu', 'tf-nightly', 'tf-nightly-2.0-preview', 'tf-nightly-gpu', 'tf-nightly-gpu-2.0-preview']
WARNING: no installation among: ['tensorflow-estimator', 'tensorflow-estimator-2.0-preview', 'tf-estimator-nightly']
INFO: installed: tensorboard-data-server==0.7.0

Issue description

As per the ProtoBuf spec, each node in the graph can have multiple inputs: https://github.com/tensorflow/tensorboard/blob/ddd0f8441ab3999590ef96301c08c5cdde9b4706/tensorboard/compat/proto/node_def.proto#L24-L29

However, the tensorboard graph plugins seems to draw only a single dataflow connection between each two nodes. Specifying multiple output tensors of the same node as inputs for another node only draws the first connection.

Specifically, these protos define two nodes x and y:

name: "x"
op: "op"
attr {
  key: "_output_shapes"
  value {
    list {
      shape {
        dim {
          size: 1
        }
      }
      shape {
        dim {
          size: 2
        }
      }
    }
  }
}
name: "y"
op: "op"
input: "x:1"
input: "x:0"

y references both output tensors from x, but the graph only shows one edge, corresponding to the second tensor with shape (2,): image Swapping the input strings creates a single edge with the first tensor instead.

I have attached an event file with the above graph proto: event.zip

raphCode avatar Jun 11 '23 11:06 raphCode