Vitis AI reports an error when generating a quantitative model
Traceback (most recent call last):
File "generate_model.py", line 191, in <module>
run_main()
File "generate_model.py", line 185, in run_main
quantize(args.build_dir,args.quant_mode,args.batchsize)
File "generate_model.py", line 160, in quantize
quantizer = torch_quantizer(quant_mode, new_model, (rand_in), output_dir=quant_model)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/apis.py", line 77, in __init__
custom_quant_ops = custom_quant_ops)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/qproc/base.py", line 122, in __init__
device=device)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/qproc/utils.py", line 175, in prepare_quantizable_module
graph = parse_module(module, input_args)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/qproc/utils.py", line 78, in parse_module
module, input_args)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/parse/parser.py", line 68, in __call__
raw_graph, raw_params = graph_handler.build_torch_graph(graph_name, module, input_args)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/parse/trace_helper.py", line 37, in build_torch_graph
fw_graph, params = self._trace_graph_from_model(input_args, train)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/parse/trace_helper.py", line 61, in _trace_graph_from_model
train)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/pytorch_nndct/utils/jit_utils.py", line 235, in trace_and_get_graph_from_model
graph, torch_out = _get_trace_graph()(model, args)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/torch/jit/__init__.py", line 277, in _get_trace_graph
outs = ONNXTracedModule(f, _force_outplace, return_inputs, _return_inputs_states)(*args, **kwargs)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 532, in __call__
result = self.forward(*input, **kwargs)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/torch/jit/__init__.py", line 360, in forward
self._force_outplace,
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/torch/jit/__init__.py", line 347, in wrapper
outs.append(self.inner(*trace_inputs))
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 530, in __call__
result = self._slow_forward(*input, **kwargs)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 516, in _slow_forward
result = self.forward(*input, **kwargs)
File "/opt/vitis_ai/conda/envs/vitis-ai-pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 96, in forward
raise NotImplementedError
NotImplementedError
The possible reasons for the above problems are:
no forward implementation is added to the model
Read More:
- [Solved] Matlab Code generate error: failed to generate all binary outputs
- Vivado Error: [Chipscope 16-302]Could not generate core for dbg_hub.Aborting IP Generate operaion.The current Vivado temporary directory path.
- VITIS Error: memory wirte error at 0x0 [How to Solve]
- Xilinx Vitis Error Launching Program: Memory write error MMU section translation fault
- Cv2.dnn read model error [How to Solve]
- How to Solve Keras calls plot_model error
- [Solved] Pytorch loading model specified GPU card number error or failed to specify
- Postgres uuid_generate_v1() does not exist [How to Solve]
- ERROR: [IMPL 213-28] Failed to generate IP.
- How to Solve Archetype generate Error
- NUXT Run generate error: is not in cwd [How to Solve]
- HLS ERROR: [IMPL 213-28] Failed to generate IP. [How to Solve]
- How to Solve VS2019 Re-generate Error
- [Solved] Swashbuckle.AspNetCore.SwaggerGen.SwaggerGeneratorException: Failed to generate Operation
- [Solved] Instantiation of ‘sdram_model_plus‘ failed. The design unit was not found.
- [Solved] C++ reason ncnn model error: Segmentation fault (core dumped)
- Laravel model save if the table has no ID field Error [How to Solve]
- EF core Creates pg library and Model Report an Error [Solved]
- Onnx to tensorrt model error [How to Solve]