leezu commented on pull request #19908:
URL: https://github.com/apache/incubator-mxnet/pull/19908#issuecomment-780877233
Also
[2021-02-17T19:49:09.680Z] ________________
test_subgraph_exe1[sym14-op_names14-default] _________________
[2021-02-17T19:49:09.680Z] [gw3] win32 -- Python 3.7.0 C:\Python37\python.exe
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] sym = <Symbol convolution20>, subgraph_backend =
'default'
[2021-02-17T19:49:09.680Z] op_names = ['sin', 'Convolution']
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] @pytest.mark.parametrize('subgraph_backend',
['default', 'default_v2'])
[2021-02-17T19:49:09.680Z] @pytest.mark.parametrize('sym,op_names',
get_graphs())
[2021-02-17T19:49:09.680Z] def test_subgraph_exe1(sym, subgraph_backend,
op_names):
[2021-02-17T19:49:09.680Z] """Use the partitioned sym to
_simple_bind an executor and compare the outputs
[2021-02-17T19:49:09.680Z] with those of the original executor"""
[2021-02-17T19:49:09.680Z] sym, _, _ = sym
[2021-02-17T19:49:09.680Z] out = SymbolHandle()
[2021-02-17T19:49:09.680Z]
check_call(_LIB.MXBuildSubgraphByOpNames(sym.handle, c_str(subgraph_backend),
mx_uint(len(op_names)),
[2021-02-17T19:49:09.680Z]
c_str_array(op_names), ctypes.byref(out)))
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] partitioned_sym = Symbol(out)
[2021-02-17T19:49:09.680Z] assert partitioned_sym.list_inputs() ==
sym.list_inputs()
[2021-02-17T19:49:09.680Z] assert partitioned_sym.list_arguments()
== sym.list_arguments()
[2021-02-17T19:49:09.680Z] assert
partitioned_sym.list_auxiliary_states() == sym.list_auxiliary_states()
[2021-02-17T19:49:09.680Z] > exe =
sym._simple_bind(ctx=mx.current_context(), grad_req='null')
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] tests\python\unittest\test_subgraph_op.py:137:
[2021-02-17T19:49:09.680Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2021-02-17T19:49:09.680Z]
windows_package\python\mxnet\symbol\symbol.py:1746: in _simple_bind
[2021-02-17T19:49:09.680Z] arg_shapes, _, aux_shapes =
self.infer_shape(**kwargs)
[2021-02-17T19:49:09.680Z]
windows_package\python\mxnet\symbol\symbol.py:1132: in infer_shape
[2021-02-17T19:49:09.680Z] res = self._infer_shape_impl(False, *args,
**kwargs)
[2021-02-17T19:49:09.680Z]
windows_package\python\mxnet\symbol\symbol.py:1267: in _infer_shape_impl
[2021-02-17T19:49:09.680Z] ctypes.byref(complete)))
[2021-02-17T19:49:09.680Z] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] ret = -1
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] def check_call(ret):
[2021-02-17T19:49:09.680Z] """Check the return value of C API call.
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] This function will raise an exception
when an error occurs.
[2021-02-17T19:49:09.680Z] Wrap every API call with this function.
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] Parameters
[2021-02-17T19:49:09.680Z] ----------
[2021-02-17T19:49:09.680Z] ret : int
[2021-02-17T19:49:09.680Z] return value from API calls.
[2021-02-17T19:49:09.680Z] """
[2021-02-17T19:49:09.680Z] if ret != 0:
[2021-02-17T19:49:09.680Z] > raise get_last_ffi_error()
[2021-02-17T19:49:09.680Z] E mxnet.base.MXNetError: MXNetError:
Error in operator convolution20: Shape inconsistent, Provided = [1,0,2,2],
inferred shape=(1,3,2,2)
[2021-02-17T19:49:09.680Z]
[2021-02-17T19:49:09.680Z] windows_package\python\mxnet\base.py:246:
MXNetError
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]