-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
ggml_conv_2d input shape #954
Comments
The comments (for some reason) use Pytorch dimension convention which is opposite to what GGML has internally. |
Okay, do we need a PR to note this detail?
…---Original---
From: ***@***.***>
Date: Mon, Sep 9, 2024 01:32 AM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [ggerganov/ggml] ggml_conv_2d input shape (Issue #954)
The comments (for some reason) use Pytorch dimension convention which is opposite to what GGML has internally.
a->ne[2] and b->ne[2] are both IC, the 3rd dimension ( 2nd in Pytorch).
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
When I recently worked on |
yes,I used |
I am a freshman about GGML, when I read the source code, I notice that the function
struct ggml_tensor * ggml_conv_2d
ggml/src/ggml.c
Line 6889 in 10e83a4
from the comment, wo can know the input shape of a is
[OC,IC, KH, KW]
and shape of b is[N, IC, IH, IW]
,but in the functionggml_im2col(ctx, a, b, s0, s1, p0, p1, d0, d1, true, a->type)
ggml/src/ggml.c
Line 6819 in 10e83a4
we assert
GGML_ASSERT(a->ne[2] == b->ne[2]);
, which meansKH== IH
, this not right I think.I’m not sure if I understood correctly. If I misunderstood, please correct me. If there is an error in the comments, I am willing to submit a PR to fix it.
The text was updated successfully, but these errors were encountered: