You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2019/07/08 15:18:16 UTC
[GitHub] [incubator-mxnet] Maicus opened a new issue #15484: Binding Model
fails with simple_bind error
Maicus opened a new issue #15484: Binding Model fails with simple_bind error
URL: https://github.com/apache/incubator-mxnet/issues/15484
## Description
Im trying to load a model which was created n c++ in python. After loading the network I want to bind it, but it's failing with various reasons.
## Environment info
```
----------Python Info----------
Version : 3.7.3
Compiler : MSC v.1915 64 bit (AMD64)
Build : ('default', 'Mar 27 2019 17:13:21')
Arch : ('64bit', 'WindowsPE')
------------Pip Info-----------
Version : 19.0.3
Directory : C:\Anaconda\lib\site-packages\pip
----------MXNet Info-----------
Version : 1.5.0
Directory : C:\Anaconda\lib\site-packages\mxnet
Hashtag not found. Not installed from pre-built package.
----------System Info----------
Platform : Windows-10-10.0.18362-SP0
system : Windows
node : DESKTOP-PAAFKLN
release : 10
version : 10.0.18362
----------Hardware Info----------
machine : AMD64
processor : Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
Name
Intel(R) Core(TM) i5-4690 CPU @ 3.50GHz
----------Network Test----------
Setting timeout: 10
Timing for MXNet: https://github.com/apache/incubator-mxnet, DNS: 0.0156 sec, LOAD: 0.7031 sec.
Timing for Gluon Tutorial(en): http://gluon.mxnet.io, DNS: 0.0156 sec, LOAD: 1.0156 sec.
Timing for Gluon Tutorial(cn): https://zh.gluon.ai, DNS: 0.0937 sec, LOAD: 0.7656 sec.
Error open FashionMNIST: https://apache-mxnet.s3-accelerate.dualstack.amazonaws.com/gluon/dataset/fashion-mnist/train-labels-idx1-ubyte.gz, <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1056)>, DNS finished in 0.031250953674316406 sec.
Timing for PYPI: https://pypi.python.org/pypi/pip, DNS: 0.0469 sec, LOAD: 0.6875 sec.
Timing for Conda: https://repo.continuum.io/pkgs/free/, DNS: 0.0156 sec, LOAD: 0.2500 sec.
```
## Error Message:
```
---------------------------------------------------------------------------
MXNetError Traceback (most recent call last)
C:\Anaconda\lib\site-packages\mxnet\symbol\symbol.py in simple_bind(self, ctx, grad_req, type_dict, stype_dict, group2ctx, shared_arg_names, shared_exec, shared_buffer, **kwargs)
1622 shared_exec_handle,
-> 1623 ctypes.byref(exe_handle)))
1624 except MXNetError as e:
C:\Anaconda\lib\site-packages\mxnet\base.py in check_call(ret)
252 if ret != 0:
--> 253 raise MXNetError(py_str(_LIB.MXGetLastError()))
254
MXNetError: Error in operator lossSegments: [17:00:32] c:\jenkins\workspace\mxnet\mxnet\include\mxnet\tuple.h:202: Check failed: i >= 0 && i < ndim(): index = 0 must be in range [0, -1)
During handling of the above exception, another exception occurred:
RuntimeError Traceback (most recent call last)
<ipython-input-6-3f60869a319d> in <module>
----> 1 mod.bind(data_shapes=[('Input',(1,1,96,96))])
C:\Anaconda\lib\site-packages\mxnet\module\module.py in bind(self, data_shapes, label_shapes, for_training, inputs_need_grad, force_rebind, shared_module, grad_req)
427 fixed_param_names=self._fixed_param_names,
428 grad_req=grad_req, group2ctxs=self._group2ctxs,
--> 429 state_names=self._state_names)
430 self._total_exec_bytes = self._exec_group._total_exec_bytes
431 if shared_module is not None:
C:\Anaconda\lib\site-packages\mxnet\module\executor_group.py in __init__(self, symbol, contexts, workload, data_shapes, label_shapes, param_names, for_training, inputs_need_grad, shared_group, logger, fixed_param_names, grad_req, state_names, group2ctxs)
278 self.num_outputs = len(self.symbol.list_outputs())
279
--> 280 self.bind_exec(data_shapes, label_shapes, shared_group)
281
282 def decide_slices(self, data_shapes):
C:\Anaconda\lib\site-packages\mxnet\module\executor_group.py in bind_exec(self, data_shapes, label_shapes, shared_group, reshape)
374 else:
375 self.execs.append(self._bind_ith_exec(i, data_shapes_i, label_shapes_i,
--> 376 shared_group))
377
378 self.data_shapes = data_shapes
C:\Anaconda\lib\site-packages\mxnet\module\executor_group.py in _bind_ith_exec(self, i, data_shapes, label_shapes, shared_group)
668 type_dict=input_types, shared_arg_names=self.param_names,
669 shared_exec=shared_exec, group2ctx=group2ctx,
--> 670 shared_buffer=shared_data_arrays, **input_shapes)
671 self._total_exec_bytes += int(executor.debug_str().split('\n')[-3].split()[1])
672 return executor
C:\Anaconda\lib\site-packages\mxnet\symbol\symbol.py in simple_bind(self, ctx, grad_req, type_dict, stype_dict, group2ctx, shared_arg_names, shared_exec, shared_buffer, **kwargs)
1627 error_msg += "%s: %s\n" % (k, v)
1628 error_msg += "%s" % e
-> 1629 raise RuntimeError(error_msg)
1630
1631 # update shared_buffer
RuntimeError: simple_bind error. Arguments:
Input: (1, 1, 96, 96)
Error in operator lossSegments: [17:00:32] c:\jenkins\workspace\mxnet\mxnet\include\mxnet\tuple.h:202: Check failed: i >= 0 && i < ndim(): index = 0 must be in range [0, -1)
```
## Minimum reproducible example
```
import mxnet as mx
symbol = mx.sym.load("symbol.txt")
mod = mx.mod.Module(symbol=symbol, context=mx.cpu(), data_names=['Input'],label_names=None)
mod.bind(data_shapes=[('Input',(1,1,96,96))])
```
## What have you tried to solve it?
1. Changed the size of the Input Shape
2. In theory the size of the images should be an grayscale 96x96 image
Here is the symbol file (I couldn't upload json so I uploaded it as a txt)
[symbol.txt](https://github.com/apache/incubator-mxnet/files/3369042/symbol.txt)
Thanks in advance for looking at my problem
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services