From e54a9a979eb7ac12f3912260778989a8edc1e41a Mon Sep 17 00:00:00 2001 From: Tianqi Chen Date: Wed, 18 Mar 2020 16:39:18 -0700 Subject: [PATCH] [TUTORIAL] Fix vta tutorial after relay function refactor (#5095) --- vta/python/vta/top/graphpack.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vta/python/vta/top/graphpack.py b/vta/python/vta/top/graphpack.py index 2689fbc..aca00a6 100644 --- a/vta/python/vta/top/graphpack.py +++ b/vta/python/vta/top/graphpack.py @@ -368,11 +368,11 @@ def get_subgraph(expr, start_name, stop_name, start_name_idx, stop_name_idx, cou def _recursion(anf, start_found, stop_found, operator_current_idx): """ Helper to obtain the subgraph. """ - if isinstance(anf, relay.expr.Function): - return relay.expr.Function(anf.params, - _recursion(anf.body, start_found, stop_found, - operator_current_idx), - anf.ret_type, anf.type_params, anf.attrs) + if isinstance(anf, relay.Function): + return relay.Function(anf.params, + _recursion(anf.body, start_found, stop_found, + operator_current_idx), + anf.ret_type, anf.type_params, anf.attrs) if isinstance(anf, relay.expr.Let): value = anf.value if isinstance(value, relay.expr.Call): -- 2.7.4