-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
init graph debug #8026
init graph debug #8026
Conversation
Superjomn
commented
Feb 1, 2018
•
edited
Loading
edited
- draw a graph for Block (due to loacl scope, only block(0) is supported)
- highlights some symbols using regex.
… feature/add_graph_debug
python/paddle/v2/fluid/framework.py
Outdated
@@ -1123,3 +1122,59 @@ def program_guard(main_program, startup_program=None): | |||
switch_main_program(main_program) | |||
if startup_program is not None: | |||
switch_startup_program(startup_program) | |||
|
|||
|
|||
def debug_block_image(block, highlights=[], path="./temp.dot"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's better to move this function to an independent file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fluid.debuger ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool, I think that is ok.
python/paddle/v2/fluid/debuger.py
Outdated
import proto.framework_pb2 as framework_pb2 | ||
|
||
|
||
def draw_block_graphviz(block, highlights=[], path="./temp.dot"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do not use collections as default value
I think we can have a directory called debugger, and put all the related file into this directory~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM