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
0/1D test for tile layer #25409
base: 5.x
Are you sure you want to change the base?
0/1D test for tile layer #25409
Conversation
1101e4c
to
4b6c5c4
Compare
4b6c5c4
to
724599b
Compare
@dkurt could you please give quick look if this PR good? |
@dkurt added removed tests |
@dkurt anything else? |
if (ndims > 1){ | ||
for (int i = 0; i < ndims; i++) | ||
{ | ||
rep_i = repeats[i]; | ||
if (rep_i != 1) | ||
{ | ||
tmp = tmp.reshape(0, dims); | ||
tmp = cv::repeat(tmp, 1, rep_i); | ||
} | ||
dims *= out_shape[i]; | ||
} | ||
tmp = tmp.reshape(0, out_shape); | ||
} else { | ||
for (int i = 0; i < repeats.size(); i++){ | ||
tmp = tmp.reshape(0, dims); | ||
tmp = cv::repeat(tmp, 1, rep_i); | ||
tmp = cv::repeat(tmp, repeats[i], 1); | ||
dims *= out_shape[i]; | ||
} | ||
dims *= out_shape[i]; | ||
tmp = tmp.reshape(0, out_shape); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do these changes imply we need to do something to cv::repeat
so that it can be used in the same way regardless 1D or 2D mat?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may be. @dkurt what do you think?
outputs[0][i] *= repeats[i]; | ||
} | ||
} else { | ||
CV_CheckGE((int)repeats.size(), 1, "Provide at least one repeat along any dimention"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Tile: Provide at least one repeat along any dimension"
This PR introduces
0/1D
test forTile
layer. It also add fuctionality to support0/1D
cases.Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.