Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix graph bugs #391

Merged
merged 22 commits into from
Apr 12, 2018
Merged

Fix graph bugs #391

merged 22 commits into from
Apr 12, 2018

Conversation

daming-lu
Copy link
Collaborator

  1. changed backend code to load JSON instead of static graph
  2. added checks so that we do not process bad graph data

TODO: add slider for large graph
We need this because if the graph is too large, each node is too small to see clearly. See MNIST vs. SqueezeNet below:

MNIST:
mnist_graph

SqueezeNet:
squeezenet_graph

@@ -483,23 +486,7 @@ def add_edge(self, source, target, label, **kwargs):

def draw_graph(model_pb_path, image_dir):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function name doesn't apply anymore. Also the we no longer need image_dir.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. This will also be renamed in the cleanup PR.

data = {'url': ''}
# TODO(daming-lu): rename variables because we switched from static graph generated by graphviz
# to d3/dagre drawn svg
if graph_image_path is not None:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will we generate static image? We might be able to remove block

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like the TODO mentioned, we need to rename and remove some stuff because we were using GraphViz previously. I will do it after the release

else:
data = {'url': '/graphs/image'}
image_dir = os.path.join(args.logdir, "graphs")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image_dir seems un-necessary now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. It will be removed in the code cleanup.

@daming-lu daming-lu merged commit 6ff9620 into PaddlePaddle:develop Apr 12, 2018
@daming-lu daming-lu deleted the fix_graph_end2end branch April 18, 2018 21:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants