mxnet
mxnet copied to clipboard
loading resnext-101-64x4d models failed!
1、My code:
import mxnet as mx
pre_trained_model = './pre_trained_models/'+'resnext-101-64x4d'
pre_trained_epoch = 0
# load pre-trained models
prefix = pre_trained_model
sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, pre_trained_epoch)
2、Error
MXNetError Traceback (most recent call last)
<ipython-input-2-948e0661c8fb> in <module>()
5 # load pre-trained models
6 prefix = pre_trained_model
----> 7 sym, arg_params, aux_params = mx.model.load_checkpoint(prefix, pre_trained_epoch)
~/DPNs/mxnet/python/mxnet/model.py in load_checkpoint(prefix, epoch)
370 - parameters will be loaded from ``prefix-epoch.params``.
371 """
--> 372 symbol = sym.load('%s-symbol.json' % prefix)
373 save_dict = nd.load('%s-%04d.params' % (prefix, epoch))
374 arg_params = {}
~/DPNs/mxnet/python/mxnet/symbol.py in load(fname)
969 raise TypeError('fname need to be string')
970 handle = SymbolHandle()
--> 971 check_call(_LIB.MXSymbolCreateFromFile(c_str(fname), ctypes.byref(handle)))
972 return Symbol(handle)
973
~/DPNs/mxnet/python/mxnet/base.py in check_call(ret)
75 """
76 if ret != 0:
---> 77 raise MXNetError(py_str(_LIB.MXGetLastError()))
78
79 if sys.version_info[0] < 3:
MXNetError: [10:53:39] /root/DPNs/mxnet/dmlc-core/include/dmlc/json.h:845: Check failed: (visited.count(it->first)) != (0) JSONReader: Missing field "backward_source_id"
At Line 6, around ^`, `
But resnext101 worked, resnext101-64x4d failed。
Proposed Labels: "Python", "Model Zoo", "Bug"
@shipeng-uestc I tried with source build from master today and the model seems to be working fine. Couldn't reproduce the issue you got. Can you confirm if you still see this issue?
@shipeng-uestc - Please reopen if your still face the issue. Note: You can install latest mxnet with below command:
pip install mxnet --pre