ó ùµÈ[c@s7dZddlZddlZddlZd„ZdS(sexport helper functionsiÿÿÿÿNc Cstjj|ƒo!tjj|ƒs3tdƒ‚nàyt|jddƒdjddƒd}|jddƒdjddƒ}t|ƒdkr–dn t|dƒ}Wn!tk rÊtj dƒ‚nXt j j ||ƒ\}}}i}|j |ƒ|j |ƒ||fSdS(szLoads the MXNet model file and returns MXNet symbol and params (weights). Parameters ---------- json_path : str Path to the json file params_path : str Path to the params file Returns ------- sym : MXNet symbol Model symbol object params : params object Model weights including both arg and aux params. s,Symbol and params files provided are invalidt.iit-sRModel and params name should be in format: prefix-symbol.json, prefix-epoch.paramsN(tostpathtisfilet ValueErrortrsplittlentintt IndexErrortloggingtinfotmxtmodeltload_checkpointtupdate( t sym_filepathtparams_filepatht model_nametparams_file_listt num_epochstsymt arg_paramst aux_paramstparams((si/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/contrib/onnx/mx2onnx/_export_helper.pyt load_modules$&",    (t__doc__RR tmxnetR R(((si/usr/local/lib/python2.7/site-packages/mxnet-1.3.1-py2.7.egg/mxnet/contrib/onnx/mx2onnx/_export_helper.pyts