You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ovc frozen_model.pb --compress_to_fp16=False
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please verify parameters and environment.
[ ERROR ] If you think this is a bug, please create new ticket here:
[ ERROR ] https://github.com/openvinotoolkit/openvino/issues.
[ ERROR ] -------------- DETAILED INFORMATION -------------
[ ERROR ] Exception from src/core/src/node.cpp:590:
node index is out of range
[ ERROR ] Traceback (most recent call last):
File "/home/anaconda3/envs/py38/lib/python3.8/site-packages/openvino/tools/ovc/convert_impl.py", line 489, in _convert
ov_model = driver(argv, {"conversion_parameters": non_default_params})
File "/home/naconda3/envs/py38/lib/python3.8/site-packages/openvino/tools/ovc/convert_impl.py", line 240, in driver
ov_model = moc_emit_ir(prepare_ir(argv), argv)
File "/home/anaconda3/envs/py38/lib/python3.8/site-packages/openvino/tools/ovc/moc_frontend/moc_emit_ir.py", line 20, in moc_emit_ir
apply_moc_transformations(ngraph_function, cf=False, smart_reshape=True)
RuntimeError: Exception from src/core/src/node.cpp:590:
node index is out of range
[ ERROR ] ----------------- END OF REPORT -----------------
[ ERROR ] -------------------------------------------------
Debug Code
I located this problem by debuging the following code.
int main() {
// Read the TensorFlow frozen model file
std::string model_content = read_binary_file(frozen_pb_path);
ov::frontend::tensorflow::FrontEnd frontend;
// Load the model using the frontend
std::vector<ov::Any> inputs = {ov::Any(frozen_pb_path)};
auto input_model = frontend.load(inputs);
if (!input_model) {
throw std::runtime_error("Failed to load input model.");
}
// Convert the entire model
auto converted_model = frontend.convert(input_model);
if (!converted_model) {
throw std::runtime_error("Failed to convert model.");
}
// Save the converted model
ov::serialize(converted_model, output_model_path, bin_model_path);
std::cout << "Model successfully converted and saved to " << output_model_path << std::endl;
ov::pass::Manager manager;
// manager.register_pass<ov::pass::SmartReshape>();
// manager.register_pass<ov::pass::MOCTransformations>(false);
manager.register_pass<ov::pass::RemoveMultiSubGraphOpDanglingParamsResults>();
// manager.register_pass<ov::pass::FlushFP32SubnormalsToZero>();
manager.run_passes(converted_model);
}
Problem Model Structure
The model before pass transformations has been saved.
unfortunately. I can't provide complete model for some reason.
The reason this issue occurs is that both subgraphs of If_4685 have dangling Parameters, and they need to delete the same Input "opt_op_all/merge_all_info_mlp_3/merge_all_info_mlp_3_batch_norm/Any" . Coincidentally, this Input is connected to the If_4685 node twice, which causes the check std::count(std::begin(op_inputs), std::end(op_inputs), current_input) failed, and op_inputs delete "opt_op_all/merge_all_info_mlp_3/merge_all_info_mlp_3_batch_norm/Any" twice, which cause the problem.
I fix this problem by adding the following code.
Step-by-step reproduction
No response
Relevant log output
No response
Issue submission checklist
I'm reporting an issue. It's not a question.
I checked the problem with the documentation, FAQ, open issues, Stack Overflow, etc., and have not found a solution.
There is reproducer code and related data files such as images, videos, models, etc.
The text was updated successfully, but these errors were encountered:
OpenVINO Version
2024.1.0
Operating System
Ubuntu 18.04 (LTS)
Device used for inference
CPU
Framework
TensorFlow 1
Model used
No response
Issue description
Problem
ovc frozen_model.pb --compress_to_fp16=False
[ ERROR ] -------------------------------------------------
[ ERROR ] ----------------- INTERNAL ERROR ----------------
[ ERROR ] Unexpected exception happened.
[ ERROR ] Please verify parameters and environment.
[ ERROR ] If you think this is a bug, please create new ticket here:
[ ERROR ] https://github.com/openvinotoolkit/openvino/issues.
[ ERROR ] -------------- DETAILED INFORMATION -------------
[ ERROR ] Exception from src/core/src/node.cpp:590:
node index is out of range
[ ERROR ] Traceback (most recent call last):
File "/home/anaconda3/envs/py38/lib/python3.8/site-packages/openvino/tools/ovc/convert_impl.py", line 489, in _convert
ov_model = driver(argv, {"conversion_parameters": non_default_params})
File "/home/naconda3/envs/py38/lib/python3.8/site-packages/openvino/tools/ovc/convert_impl.py", line 240, in driver
ov_model = moc_emit_ir(prepare_ir(argv), argv)
File "/home/anaconda3/envs/py38/lib/python3.8/site-packages/openvino/tools/ovc/moc_frontend/moc_emit_ir.py", line 20, in moc_emit_ir
apply_moc_transformations(ngraph_function, cf=False, smart_reshape=True)
RuntimeError: Exception from src/core/src/node.cpp:590:
node index is out of range
[ ERROR ] ----------------- END OF REPORT -----------------
[ ERROR ] -------------------------------------------------
Debug Code
I located this problem by debuging the following code.
Problem Model Structure
The model before pass transformations has been saved.
unfortunately. I can't provide complete model for some reason.
Fix
The reason this issue occurs is that both subgraphs of If_4685 have dangling Parameters, and they need to delete the same Input "opt_op_all/merge_all_info_mlp_3/merge_all_info_mlp_3_batch_norm/Any" . Coincidentally, this Input is connected to the If_4685 node twice, which causes the check std::count(std::begin(op_inputs), std::end(op_inputs), current_input) failed, and op_inputs delete "opt_op_all/merge_all_info_mlp_3/merge_all_info_mlp_3_batch_norm/Any" twice, which cause the problem.
I fix this problem by adding the following code.
Step-by-step reproduction
No response
Relevant log output
No response
Issue submission checklist
The text was updated successfully, but these errors were encountered: