Skip to content
New issue

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

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

Already on GitHub? # to your account

How to change operation name in the graph? #48

Open
zdaiot opened this issue Apr 12, 2022 · 4 comments
Open

How to change operation name in the graph? #48

zdaiot opened this issue Apr 12, 2022 · 4 comments

Comments

@zdaiot
Copy link

zdaiot commented Apr 12, 2022

Hello,Do you knwo how to change operation name in the graph?Which api should I use?

@vlasenkoalexey
Copy link
Collaborator

To change operation name use graph.rename_node, to change operation type use node.change_op_type.

@zdaiot
Copy link
Author

zdaiot commented Apr 14, 2022

@vlasenkoalexey
Hello,I use TF1.15. And I get AttributeError: 'Graph' object has no attribute 'rename_node'

@vlasenkoalexey
Copy link
Collaborator

See how to use it in examples:

g.rename_node("raw_image", name_of_input_node)

@zdaiot
Copy link
Author

zdaiot commented Apr 15, 2022

@vlasenkoalexey
Thanks your reply. But I found that this example operates on frozen graph.
Do you know how to change the node name in checkpoint or savedmodel?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants