Test Model Problem
My model alreday finished ONNX to ONNX (ONNX optimization).
# Test onnx2onnx part
m = onnx.load("/data1/output.onnx")
# Test evaluation
km = ktc.ModelConfig(1001, "0001", "720", onnx_model=m)
eval_result = km.evaluate()
print("Evaluation result:\n", eval_result)
# Test analysis
image = Image.open("/data1/test/a.png")
image = image.convert("RGB")
image = Image.fromarray(np.array(image)[...,::-1])
img_data = np.array(image.resize((256, 456), Image.BILINEAR)) / 255
analysis_result = km.analysis({"data": [img_data]})
print("Analysis result:\n", analysis_result)
# Test compile
compile_result = ktc.compile([km])
print("Compile result:\n", compile_result)
# Test inferencer
img_data = np.expand_dims(img_data, axis=0)
ktc.kneron_inference(img_data, nef_file=compile_result, radix=ktc.get_radix([img_data]))
=========================================================================================
terminate called after throwing an instance of 'InvalidProgramInput'
what(): Invalid program input: undefined CPU op [Elu] of node [Elu_49_kn]
Traceback (most recent call last):
File "test_python_api.py", line 54, in <module>
compile_result = ktc.compile([km])
File "/workspace/miniconda/lib/python3.7/site-packages/ktc/toolchain.py", line 120, in compile
return encrypt_compile(model_list, output_dir, dedicated_output_buffer, mode=None)
File "/workspace/miniconda/lib/python3.7/site-packages/ktc/toolchain.py", line 188, in encrypt_compile
subprocess.run(commands, check=True)
File "/workspace/miniconda/lib/python3.7/subprocess.py", line 512, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/workspace/libs/compiler/batch_compile_beethoven', '/data1/batch_compile/batch_compile_bconfig.json', '-s', '-t', 'kneron/toolchain:v0.14.2\n', '-o']' died with <Signals.SIGABRT: 6>.
Comments
Hi all,
I already follow YOLOv3 step to step, I have onnx and bie and nef, I used the last method about inference three model onnx / bie / nef.
My onnx inference has data, but my bie always Segmentation fault (core dumped).
My nef always stops, can't inference image.
The following is my files.
Sorry but I don't understand your question. Could you show more details about your issue? Including the command you used, full error message, and so on. And it will be helpful if you could provide your onnx file.
Did you successfully get the converted onnx, bie and nef file? Or which step you encountered error?
And I found the format of input_params.json you provided is not correct. Please refer to the example in "/workspace/examples/LittleNet/input_params.json".