diff --git a/python/mxnet/symbol/contrib.py b/python/mxnet/symbol/contrib.py index 2d067555e8dc..c1a04a105d74 100644 --- a/python/mxnet/symbol/contrib.py +++ b/python/mxnet/symbol/contrib.py @@ -187,16 +187,15 @@ def check_data(inputs, in_type, msg): # the python function, we need to prune the computation graph constructed from # the function. One way of doing it is to mark the nodes in the computation graph # with AttrScope and prune the nodes without the special attribute. - with AttrScope(subgraph_name=name): - if isinstance(data, list): - in_eles = [symbol.var(sym.name) for sym in data] - else: - in_eles = symbol.var(data.name) - if isinstance(init_states, list): - states = [symbol.var(s.name) for s in init_states] - else: - states = symbol.var(init_states.name) - sym_out, sym_states = body(in_eles, states) + if isinstance(data, list): + in_eles = [symbol.var(sym.name) for sym in data] + else: + in_eles = symbol.var(data.name) + if isinstance(init_states, list): + states = [symbol.var(s.name) for s in init_states] + else: + states = symbol.var(init_states.name) + sym_out, sym_states = body(in_eles, states) check_data(sym_out, symbol.Symbol, "the output should be an NDArray or a list of NDArrays") check_data(sym_states, symbol.Symbol, diff --git a/src/c_api/c_api_symbolic.cc b/src/c_api/c_api_symbolic.cc index 34819e83d506..be008e92e86f 100644 --- a/src/c_api/c_api_symbolic.cc +++ b/src/c_api/c_api_symbolic.cc @@ -38,11 +38,10 @@ void RegisterLegacyOpProp(); void RegisterLegacyNDFunc(); } const std::vector kHiddenKeys = { - "ctx_group", "lr_mult", "wd_mult", "force_mirroring", "mirror_stage", "subgraph_name" + "ctx_group", "lr_mult", "wd_mult", "force_mirroring", "mirror_stage" }; const std::vector kReplacedHiddenKeys = { - "__ctx_group__", "__lr_mult__", "__wd_mult__", "__force_mirroring__", "__mirror_stage__", - "subgraph_name" + "__ctx_group__", "__lr_mult__", "__wd_mult__", "__force_mirroring__", "__mirror_stage__" }; const char *kNamespaceSeparator = "$";