fix bug in ggml_out_prod which resulted in wrong n_dims of result tensors
This commit is contained in:
parent
44526cb261
commit
a252111b45
1 changed files with 1 additions and 1 deletions
2
ggml.c
2
ggml.c
|
@ -5928,7 +5928,7 @@ struct ggml_tensor * ggml_out_prod(
|
||||||
}
|
}
|
||||||
|
|
||||||
const int64_t ne[4] = { a->ne[0], b->ne[0], a->ne[2], b->ne[3] };
|
const int64_t ne[4] = { a->ne[0], b->ne[0], a->ne[2], b->ne[3] };
|
||||||
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, MIN(a->n_dims, b->n_dims), ne);
|
struct ggml_tensor * result = ggml_new_tensor(ctx, GGML_TYPE_F32, MAX(a->n_dims, b->n_dims), ne);
|
||||||
|
|
||||||
result->op = GGML_OP_OUT_PROD;
|
result->op = GGML_OP_OUT_PROD;
|
||||||
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
|
result->grad = is_node ? ggml_dup_tensor(ctx, result) : NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue