Open benschreiber opened 5 years ago
What you could try to do is remove the conditional statement on L117-121 of model.py and using self.img_pl
directly in the map argument on L122: the cond statement is responsible for converting the input to the same shape no matter if it's a single image or an array of images. Removing the statement will only make the model accept an array, but on the flip side, the conversion to ONNX might work.
I have done the steps as you mentioned but now I'm getting another error
ValueError: slice index 0 of dimension 0 out of bounds. for 'map/strided_slice' (op: 'StridedSlice') with input shapes: [0], [1], [1], [1] and with computed input tensors: input[1] = <0>, input[2] = <1>, input[3] = <1>.
@mialo-tech I meet the same question. Do you fix the problem?
@mialo-tech I meet the same question. Do you fix the problem?
No
I am attempting to convert this model to ONNX using the tf2onnx tool. The tool can take a frozen graph or saved model as input and produce an ONNX file. Unfortunately, it fails on aocr, apparently to due the graph being invalid.
I am filing the issue here and not against tf2onnx because the error occurred in Tensorflow while attempting to import the graph that
aocr export
produced. Here is the error:To reproduce:
alternatively,