-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
split op questions for model otimizer #1
Comments
Hi @kaixuanliu, It seems that you may be right based of what's currently implemented and what's in caffe's documentation for the split layer. I will do a test with the split layer coded as a copy instead of needing num_split value and check the results. |
Hi @kaixuanliu, you are correct. A bug has been created for this and we plan on fixing this. |
Hi @kaixuanliu. It is not enough just to change the infer function for the Split layer. In fact, if you do this you break conversion of the models from other frameworks (TF, MXNet, Kaldi, etc). The right solution would be to eliminate Split layers during conversion of the Caffe models. Create a file "model_optimizer/extensions/front/caffe/remove_split.py" with the following content: from mo.front.common.replacement import FrontReplacementOp
class RemoveSplit(FrontReplacementOp):
op = "Split"
enabled = True
def replace_sub_graph(self, graph, match):
split = match['op']
split.op = 'Identity'
for _, __, edge_attrs in graph.out_edges(split.id, data=True):
edge_attrs['out'] = 0 |
Hi,@lazarevevgeny I agree with you. Sorry I am not familiar with TF or MXNet, and I have this concern before as you. |
support argmax
Signed-off-by: Roman Kazantsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
* Specify operation CTCLoss-4 Signed-off-by: Roman Kazantsev <[email protected]> * Correct documentation for CTCLoss after #1 review Signed-off-by: Roman Kazantsev <[email protected]> * Correct documentation for CTCLoss after #2 review Signed-off-by: Roman Kazantsev <[email protected]> * Correct documentation for CTCLoss after #3 review * Correct documentation for CTCLoss after #4 review Signed-off-by: Roman Kazantsev <[email protected]> * Correct layout for logits and add more description for unique attribute Signed-off-by: Roman Kazantsev <[email protected]> * Correct types for length and indices tensors Signed-off-by: Roman Kazantsev <[email protected]> * Correct formulas and punctuation Signed-off-by: Roman Kazantsev <[email protected]>
* doc migration * fix * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (#1) * Changed DL Workbench structure * Fixed tags * fixes * Update ie_docs.xml * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * CVS-31131 fixes * Additional fixes * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * fix broken link * Update opset.md
* Doc Migration from Gitlab (#1289) * doc migration * fix * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (#1) * Changed DL Workbench structure * Fixed tags * fixes * Update ie_docs.xml * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * CVS-31131 fixes * Additional fixes * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * fix broken link * Update opset.md * fix * added opset4 to layout * added new opsets to layout, set labels for them * Update VisionAcceleratorFPGA_Configure.md Updated from 2020.3 to 2020.4 Co-authored-by: domi2000 <[email protected]>
* Doc Migration from Gitlab (openvinotoolkit#1289) * doc migration * fix * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (#1) * Changed DL Workbench structure * Fixed tags * fixes * Update ie_docs.xml * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * CVS-31131 fixes * Additional fixes * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * fix broken link * Update opset.md * fix * added opset4 to layout * added new opsets to layout, set labels for them * Update VisionAcceleratorFPGA_Configure.md Updated from 2020.3 to 2020.4 Co-authored-by: domi2000 <[email protected]>
* Doc Migration from Gitlab (openvinotoolkit#1289) * doc migration * fix * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (openvinotoolkit#1) * Changed DL Workbench structure * Fixed tags * fixes * Update ie_docs.xml * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * CVS-31131 fixes * Additional fixes * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * fix broken link * Update opset.md * fix * added opset4 to layout * added new opsets to layout, set labels for them * Update VisionAcceleratorFPGA_Configure.md Updated from 2020.3 to 2020.4 Co-authored-by: domi2000 <[email protected]>
* Doc Migration from Gitlab (openvinotoolkit#1289) * doc migration * fix * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (openvinotoolkit#1) * Changed DL Workbench structure * Fixed tags * fixes * Update ie_docs.xml * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * CVS-31131 fixes * Additional fixes * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * fix broken link * Update opset.md * fix * added opset4 to layout * added new opsets to layout, set labels for them * Update VisionAcceleratorFPGA_Configure.md Updated from 2020.3 to 2020.4 Co-authored-by: domi2000 <[email protected]>
* doc migration * fix * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (openvinotoolkit#1) * Changed DL Workbench structure * Fixed tags * fixes * Update ie_docs.xml * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * CVS-31131 fixes * Additional fixes * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * fix broken link * Update opset.md
* update system requirements (#1321) * update release version in readme * Doc Migration from Gitlab (#1289) * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (#1) * Changed DL Workbench structure * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * Update opset.md * Update VisionAcceleratorFPGA_Configure.md (#1378) Updated from 2020.3 to 2020.4 Co-authored-by: domi2000 <[email protected]> * Updated documentation for 2020.4 (#1434) * Updated documentation for 2020.4 * Updated Core::ReadNetwork documentation (#1178) Co-authored-by: Ilya Churaev <[email protected]> Co-authored-by: Nikolay Tyukaev <[email protected]> Co-authored-by: domi2000 <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]> Co-authored-by: Ilya Churaev <[email protected]>
* [GNA] Update GNA lib + propagate QoS timeout to the calling app (#1188) * [GNA] Remove empty PWL (#1459) * [GNA] Support timeout value set in Wait (#1499) * [GNA] Bump GNA2 version to 1010 (#1510) * [GNA] stored request id for completed sync infer request in order to get status later using wait() (#1458) * stored request id for completed async infer request in order to get it's status later * preserved status not started for multiple sequential calls to wait() Co-authored-by: Denis Orlov <[email protected]> * [GNA] Fix callbacks (#1607) * [GNA] Bump GNA2 version to 1047 (#1614) * merge documentation updates from 2020/4 branch (#1671) * update system requirements (#1321) * update release version in readme * Doc Migration from Gitlab (#1289) * Update FakeQuantize_1.md * Update performance_benchmarks.md * Updates graphs for FPGA * Update performance_benchmarks.md * Change DL Workbench structure (#1) * Changed DL Workbench structure * Update performance_benchmarks_faq.md * Fixes in DL Workbench layout * Fixes for CVS-31290 * [DL Workbench] Minor correction * Fix for CVS-30955 * Added nGraph deprecation notice as requested by Zoe * fix broken links in api doxy layouts * Fixed POT TOC * Update PAC_Configure.md PAC DCP 1.2.1 install guide. * Update inference_engine_intro.md * Update opset.md * Update VisionAcceleratorFPGA_Configure.md (#1378) Updated from 2020.3 to 2020.4 Co-authored-by: domi2000 <[email protected]> * Updated documentation for 2020.4 (#1434) * Updated documentation for 2020.4 * Updated Core::ReadNetwork documentation (#1178) Co-authored-by: Ilya Churaev <[email protected]> Co-authored-by: Nikolay Tyukaev <[email protected]> Co-authored-by: domi2000 <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]> Co-authored-by: Ilya Churaev <[email protected]> * Documentation updates for 2020.4 (#1672) (#1729) * Doc updates * 2020.4 doc updates * Removed </br> tag * Minor fix * Minor fixes * Updated documentation for 2020.4 (#1434) * Updated documentation for 2020.4 * Updated Core::ReadNetwork documentation (#1178) * Fixed docs Co-authored-by: Ilya Churaev <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]> Co-authored-by: Ilya Churaev <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]> Co-authored-by: Ilya Churaev <[email protected]> Co-authored-by: Pavel Rodionov <[email protected]> Co-authored-by: Eugene Smirnov <[email protected]> Co-authored-by: Alexey Suhov <[email protected]> Co-authored-by: Ilya Churaev <[email protected]> Co-authored-by: Nikolay Tyukaev <[email protected]> Co-authored-by: domi2000 <[email protected]> Co-authored-by: Ilya Lavrenov <[email protected]> Co-authored-by: Andrey Zaytsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
Signed-off-by: Roman Kazantsev <[email protected]>
…n and test (#1906) * Implement reshapeable CTCGreedyDecoderPlusSparseToDense transformation and test Signed-off-by: Roman Kazantsev <[email protected]> * Fix consts (after code-review #1) Signed-off-by: Roman Kazantsev <[email protected]> * Add CTCGreedyDecoderTransformation with more generic pattern Also it adds new middle-replacer for transforming sequence length to a mask along with tests. Signed-off-by: Roman Kazantsev <[email protected]> * Do fixes after review #2 Signed-off-by: Roman Kazantsev <[email protected]> * Fix after review #3 Signed-off-by: Roman Kazantsev <[email protected]> * Fix after review #4 Signed-off-by: Roman Kazantsev <[email protected]>
…n and test (openvinotoolkit#1906) * Implement reshapeable CTCGreedyDecoderPlusSparseToDense transformation and test Signed-off-by: Roman Kazantsev <[email protected]> * Fix consts (after code-review #1) Signed-off-by: Roman Kazantsev <[email protected]> * Add CTCGreedyDecoderTransformation with more generic pattern Also it adds new middle-replacer for transforming sequence length to a mask along with tests. Signed-off-by: Roman Kazantsev <[email protected]> * Do fixes after review #2 Signed-off-by: Roman Kazantsev <[email protected]> * Fix after review #3 Signed-off-by: Roman Kazantsev <[email protected]> * Fix after review #4 Signed-off-by: Roman Kazantsev <[email protected]>
### Details: - *item1* CID 1529754: (#1 of 1): COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE) 1. copy_constructor_call: node_info_table is passed-by-value as parameter to parse_freq_info_linux when it could be moved instead. Use std::move(node_info_table) instead of node_info_table. 221 node_info_table, 222 _processors, 223 _numa_nodes, 224 _sockets, 225 _cores, 226 _proc_type_table, 227 _cpu_mapping_table); ### Tickets: - *ticket-id*
### Details: - *fix coverity scan issue CID 1537543* config.streamExecutorConfig = IStreamsExecutor::Config{"CPUStreamsExecutor", 706 config.streams, 707 config.threadsPerStream, 708 ov::hint::SchedulingCoreType::ANY_CORE, 709 false, 710 cpu_pinning, CID 1537543: (#1 of 1): COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE) 1. copy_constructor_call: streams_info_table is passed-by-value as parameter to ov::threading::IStreamsExecutor::Config::Config(std::string, int, int, ov::hint::SchedulingCoreType, bool, bool, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<int, std::allocator<int> >) when it could be moved instead. Use std::move(streams_info_table) instead of streams_info_table. 711 streams_info_table}; 712 ### Tickets: - *ticket-id*
### Details: - *item1* CID 1529754: (openvinotoolkit#1 of 1): COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE) 1. copy_constructor_call: node_info_table is passed-by-value as parameter to parse_freq_info_linux when it could be moved instead. Use std::move(node_info_table) instead of node_info_table. 221 node_info_table, 222 _processors, 223 _numa_nodes, 224 _sockets, 225 _cores, 226 _proc_type_table, 227 _cpu_mapping_table); ### Tickets: - *ticket-id*
### Details: - *fix coverity scan issue CID 1537543* config.streamExecutorConfig = IStreamsExecutor::Config{"CPUStreamsExecutor", 706 config.streams, 707 config.threadsPerStream, 708 ov::hint::SchedulingCoreType::ANY_CORE, 709 false, 710 cpu_pinning, CID 1537543: (openvinotoolkit#1 of 1): COPY_INSTEAD_OF_MOVE (COPY_INSTEAD_OF_MOVE) 1. copy_constructor_call: streams_info_table is passed-by-value as parameter to ov::threading::IStreamsExecutor::Config::Config(std::string, int, int, ov::hint::SchedulingCoreType, bool, bool, std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >, std::vector<int, std::allocator<int> >) when it could be moved instead. Use std::move(streams_info_table) instead of streams_info_table. 711 streams_info_table}; 712 ### Tickets: - *ticket-id*
Hi, I ran across a problem when I use mo to convert a caffemodel, it shows
'LayerParameter' object has no attribute 'num_split'
for split layer. However, as far as I am concerned, split layer in caffe is just a copy operation. So I think this sentence_out_shape[node.axis] = np.int64(input_node.shape[node.axis] / _node.pb.num_split)
inmo/ops/split.py
should be like this:out_shape[node.axis] = np.int64(input_node.shape[node.axis])
You may mistake split layer as slice layer, I guess.
The text was updated successfully, but these errors were encountered: