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

[Doc] ConvertLayout - Call RemoveUnunsedFunctions. #4834

Merged
merged 1 commit into from
Feb 7, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion docs/dev/convert_layout.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,11 @@ ConvertLayout pass is extremely easy to use. The pass is not a part of default r
dtype_dict=dtype_dict)

# Convert the layout to NCHW
mod = relay.transform.ConvertLayout('NCHW')(mod)
# RemoveUnunsedFunctions is used to clean up the graph.
seq = relay.transform.Sequential([relay.transform.RemoveUnusedFunctions(),
relay.transform.ConvertLayout('NCHW')])
with relay.transform.PassContext(opt_level=3):
mod = seq(mod)

# Call relay compilation
with relay.build_config(opt_level=3):
Expand Down