Commit 4c961ddf by Animesh Jain Committed by Wei Chen

[Doc] ConvertLayout - Call RemoveUnunsedFunctions.

parent e578777f
...@@ -226,7 +226,11 @@ ConvertLayout pass is extremely easy to use. The pass is not a part of default r ...@@ -226,7 +226,11 @@ ConvertLayout pass is extremely easy to use. The pass is not a part of default r
dtype_dict=dtype_dict) dtype_dict=dtype_dict)
# Convert the layout to NCHW # 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 # Call relay compilation
with relay.build_config(opt_level=3): with relay.build_config(opt_level=3):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment