summaryrefslogtreecommitdiff
path: root/caffe2/core
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@fb.com>2019-02-12 14:43:44 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2019-02-12 15:02:50 -0800
commitf435fb8290aeb00fbfa0191d5c42c59c5a772623 (patch)
treec6fd7dafb2a2d4d3cf598ae74596223ef93ec5ea /caffe2/core
parent65b49b46966abc1fd9b7ad6668a994e9a669be96 (diff)
downloadpytorch-f435fb8290aeb00fbfa0191d5c42c59c5a772623.tar.gz
pytorch-f435fb8290aeb00fbfa0191d5c42c59c5a772623.tar.bz2
pytorch-f435fb8290aeb00fbfa0191d5c42c59c5a772623.zip
Allow customization of blob node in net_drawer (#16915)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/16915 TSIA Reviewed By: ipiszy Differential Revision: D14018010 fbshipit-source-id: df5ccc06fa37f08e7a02a8acc466c4ad47afe04e
Diffstat (limited to 'caffe2/core')
-rw-r--r--caffe2/core/nomnigraph/include/nomnigraph/Converters/Dot.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/caffe2/core/nomnigraph/include/nomnigraph/Converters/Dot.h b/caffe2/core/nomnigraph/include/nomnigraph/Converters/Dot.h
index e279378304..2a2800401c 100644
--- a/caffe2/core/nomnigraph/include/nomnigraph/Converters/Dot.h
+++ b/caffe2/core/nomnigraph/include/nomnigraph/Converters/Dot.h
@@ -38,8 +38,7 @@ class DotGenerator {
const typename GraphT::SubgraphType& sg,
const std::vector<typename GraphT::SubgraphType*>& subgraphs) const {
std::ostringstream output;
- output << "digraph G {\n\
- ";
+ output << "digraph G {\nrankdir=LR\n";
for (const auto& node : sg.getNodes()) {
generateNode(node, sg, output);
}
@@ -60,8 +59,7 @@ class DotGenerator {
// Convert a subgraph to dot.
std::string convert(const typename GraphT::SubgraphType& sg) const {
std::ostringstream output;
- output << "digraph G {\n\
- ";
+ output << "digraph G {\nrankdir=LR\n";
for (const auto& node : sg.getNodes()) {
generateNode(node, sg, output);
}
@@ -82,7 +80,7 @@ class DotGenerator {
*/
std::string convertStruct(const typename GraphT::SubgraphType& sg) const {
std::ostringstream output;
- output << "digraph G {\n";
+ output << "digraph G {\nrankdir=LR\n";
// Get input nodes (nodes w/o parents)
std::unordered_map<typename GraphT::NodeRef, int>