in predict assert self.binded and self.params_initialized AssertionError
2018-03-09 23:37
2361 查看
错误一:in predict assert self.binded and self.params_initialized AssertionError ###需要绑定data_shape 错误二:InferShape pass cannot decide shapes for the following arguments (0s means unknown dimensions). Please consider providing them as inputs: softmax_label: (), ##提示需要绑定label_shape model = mx.mod.Module.load('symbol/ocr',100) data_shape = [("data", (1, 3, 60, 60))] #####问题一原因 label_shape=[("softmax_label",(1,))] #####问题二原因 model.bind(data_shape,label_shape) #####解决问题 #help(model) res = np.array(model.predict(val)[0]) print "预测结果为:%s" %(np.argmax(res))
添加##### 结尾的3句代码
相关文章推荐
- AssertionError while merging cells with xlwt (Python)
- apache 的error日志:Pango-CRITICAL **: pango_context_load_font: assertion `pango_font_description_get_family (desc) != NULL' failed
- fedora14下运行程序出现GLib- GIO:ERROR:gdbusconnection.c:2270:initable_init: assertion failed: (connection-
- FATAL ERROR in native method: JDWP No transports initialized
- FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(
- junit.framework.AssertionFailedError: No tests found in错误解决办法
- junit4 junit.framework.AssertionFailedError: No tests found in错误
- intllij idea 出现 java.lang.AssertionError:upexpected content storage modification错误信息
- T60 开机提示 ERROR Expansion ROM not initialized - PCI on Motherboard 的解决方法
- FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(
- #測试相关#Getting “junit.framework.AssertionFailedError: Forked Java VM exited abnormally” Exception
- FATAL ERROR in native method: JDWP No transports initialized
- java.lang.AssertionError: UNIMPLEMENTED
- FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT
- java.lang.instrument ASSERTION FAILED ***: "error == JVMTI_ERROR_NONE" at Reentrancy.c line: 161
- error: int-array initialized from non-wide string 和wchar_t
- (C++) Assertion failed: !"Bad error code", file VMem.c, line 715
- OpenCV Error: Assertion failed (s >= 0)
- [已解决]junit.framework.AssertionFailedError: No tests found in com.wbm.app.business.NeedLoginTestCase
- atom markdown报错:AssertionError: html-pdf: Failed to load PhantomJS module.