Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tensorboard/plugins/graph/tf_graph_common/graph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,10 @@ function extractOutputShapes(
// into a number.
return shape.dim.map((dim) => {
// Size can be -1 if this particular dimension is unknown.
return dim.size;
// If we actually have a 0-dimension tensor `dim.size` returns null,
// so we default to 0 in this case to avoid upstream null-handling
// issues.
return dim.size || 0;
});
});
// Since we already processed it, remove the entry from the attribute
Expand Down