in predict assert self.binded and self.params_initialized AssertionError
671 ワード
: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文コードを追加