Skip to content

generate gemm sampel for 3.4 branch#983

Merged
alalek merged 3 commits intoopencv:3.4from
zihaomu:gemm_onnx_bug_fix_branch34
Jun 23, 2022
Merged

generate gemm sampel for 3.4 branch#983
alalek merged 3 commits intoopencv:3.4from
zihaomu:gemm_onnx_bug_fix_branch34

Conversation

@zihaomu
Copy link
Copy Markdown
Member

@zihaomu zihaomu commented Jun 22, 2022

@rogday
Copy link
Copy Markdown
Member

rogday commented Jun 22, 2022

I think you regenerated the models. Could you use the same data so that we don't have conflicts in the future?

@zihaomu
Copy link
Copy Markdown
Member Author

zihaomu commented Jun 22, 2022

I think you regenerated the models. Could you use the same data so that we don't have conflicts in the future?

Thanks for your careful checking. It's done.

Copy link
Copy Markdown
Member

@rogday rogday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust you just copied and pasted binary files

import google.protobuf.text_format
import io
from typing import Optional

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the master branch there is only one empty line here

Copy link
Copy Markdown
Member Author

@zihaomu zihaomu Jun 22, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Now I understand, we need to make sure that the bits of PR of the two branches are exactly the same.
Short question, if we encounter the same thing in the future, can we do this via git? rather than manual copying.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forwarding this question to @alalek

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

4.6.0 - 2 empty lines: https://github.com/opencv/opencv_extra/blob/4.6.0/testdata/dnn/onnx/generate_onnx_models.py

In the master branch there is only one empty line here

one line is here for the last few hours only: #982


Git works well in one-way. Two-way merging is a mess in general (some changes are just lost).
Proposed patches propagation is 3.4 -> 4.x -> 5.x: https://github.com/opencv/opencv/wiki/Branches
So this is why we need to put code into 3.4 branch first instead of 4.x if it is applicable and needed.
Manual backporting 4.x -> 3.4 is possible, but it is still manual (through git cherry-pick and resolving conflicts).

model_def = assertONNXExpected(onnx_model_pb)
with open(models_files, 'wb') as file:
file.write(model_def.SerializeToString())

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and two empty lines instead of one here

Copy link
Copy Markdown
Member

@rogday rogday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@alalek alalek merged commit fdba14b into opencv:3.4 Jun 23, 2022
@alalek alalek mentioned this pull request Jul 26, 2022
This was referenced Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants