altosaar opened a new issue #10990: Gluon hybridize fails to detect an input
URL: https://github.com/apache/incubator-mxnet/issues/10990
 
 
   Here is a minimal example of hybridize failing to detect an input: 
https://gist.github.com/altosaar/6c29d8ac505ae1cea03ca65f193e7832
   
   Without hybridize, this code runs fine. 
   
   However, hybridize thinks one of the inputs is not used. Stack trace:
   
   ```/usr/local/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:36: 
FutureWarning: Conversion of the second argument of issubdtype from `float` to 
`np.floating` is deprecated. In future, it will be treated as `np.float64 == 
np.dtype(float).type`.
     from ._conv import register_converters as _register_converters
   /usr/local/anaconda3/lib/python3.6/site-packages/mxnet/gluon/block.py:414: 
UserWarning: The 2-th input to HybridBlock is not used by any computation. Is 
this intended?
     return self.forward(*args)
   Traceback (most recent call last):
     File "gluon-hybridize-error.py", line 70, in <module>
       model(users, items, item_counts, set_sizes)
     File 
"/usr/local/anaconda3/lib/python3.6/site-packages/mxnet/gluon/block.py", line 
414, in __call__
       return self.forward(*args)
     File 
"/usr/local/anaconda3/lib/python3.6/site-packages/mxnet/gluon/block.py", line 
620, in forward
       return self._call_cached_op(x, *args)
     File 
"/usr/local/anaconda3/lib/python3.6/site-packages/mxnet/gluon/block.py", line 
525, in _call_cached_op
       self._build_cache(*args)
     File 
"/usr/local/anaconda3/lib/python3.6/site-packages/mxnet/gluon/block.py", line 
513, in _build_cache
       self._cached_op = ndarray.CachedOp(out, self._flags, input_names, 
param_dict)
     File 
"/usr/local/anaconda3/lib/python3.6/site-packages/mxnet/_ctypes/ndarray.py", 
line 130, in __init__
       ctypes.byref(self.handle)))
     File "/usr/local/anaconda3/lib/python3.6/site-packages/mxnet/base.py", 
line 210, in check_call
       raise MXNetError(py_str(_LIB.MXGetLastError()))
   mxnet.base.MXNetError: [16:11:21] src/imperative/cached_op.cc:91: Check 
failed: arg_name_to_id.size() == arg_names.size() (3 vs. 4) CachedOp expects 3 
inputs, given 4
   
   Stack trace returned 6 entries:
   [bt] (0) 0   libmxnet.so                         0x0000000111e58bb4 
libmxnet.so + 19380
   [bt] (1) 1   libmxnet.so                         0x0000000111e5896f 
libmxnet.so + 18799
   [bt] (2) 2   libmxnet.so                         0x0000000112f0906f 
MXNDListFree + 353135
   [bt] (3) 3   libmxnet.so                         0x0000000112e8cead 
MXCreateCachedOpEx + 845
   [bt] (4) 4   libffi.6.dylib                      0x000000011063b884 
ffi_call_unix64 + 76
   [bt] (5) 5   ???                                 0x00007ffee0120790 0x0 + 
140732657698704
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to