aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/graph/dot.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <nobody@tensorflow.org>2016-05-25 06:46:58 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-05-25 08:02:54 -0700
commita68bf787b3d14b5e9e6a64a641d36ac35d69fe8d (patch)
tree55fb7a237c52e4b3eba6db3084c6579bda5ba2ab /tensorflow/core/graph/dot.h
parent0db67854fd78e6dce2576e190c079b08ef183225 (diff)
Make it possible to override the node color in dot graphs via DotOptions.
Change: 123212554
Diffstat (limited to 'tensorflow/core/graph/dot.h')
-rw-r--r--tensorflow/core/graph/dot.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/core/graph/dot.h b/tensorflow/core/graph/dot.h
index 79a538978a..96e48773a9 100644
--- a/tensorflow/core/graph/dot.h
+++ b/tensorflow/core/graph/dot.h
@@ -48,6 +48,11 @@ struct DotOptions {
// A function that returns the "cost" of the edge. The dot display
// makes a edge thickness proportional to its cost.
std::function<double(const Edge*)> edge_cost;
+
+ // A function that returns a color number to apply to each node. < 0 means
+ // no color. A color will be assigned to each color number from a palette;
+ // adjacent color numbers will receive different colors.
+ std::function<int(const Node*)> node_color;
};
// Return a string that contains a graphviz specification of the graph.