# Unclear dimension error message

**URL:** <https://discourse.julialang.org/t/unclear-dimension-error-message/62659>\
**Category:** New to Julia\
**Created:** [June 10, 2021, 7:40am UTC](https://discourse.julialang.org/t/unclear-dimension-error-message/62659 "2021-06-10T07:40:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shawngiese](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@shawngiese](https://discourse.julialang.org/u/shawngiese)\
**Post date:** [June 10, 2021, 7:40am UTC](https://discourse.julialang.org/t/unclear-dimension-error-message/62659/1 "2021-06-10T07:40:15Z")

</div>

Hi, new user trying to use flux for a convolution network. I get the error:  
`DimensionMismatch("A has dimensions (1024,64) but B has dimensions (1024,64)")`

But I do not understand what that means. Are the dimensions supposed to be different in some way?

---

<div class="post-metadata">

**Author:** ![tomerarnon](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tomerarnon/32/3170_2.png) [@tomerarnon](https://discourse.julialang.org/u/tomerarnon)\
**Post date:** [June 10, 2021, 7:54am UTC](https://discourse.julialang.org/t/unclear-dimension-error-message/62659/2 "2021-06-10T07:54:27Z")

</div>

The error is probably thrown from a matrix multiplication (the stacktrace will show you what exactly is causing it). For matrix multiplication, you need the dimensions to be `(N, M) * (M, L)` (i.e. the inner dimension must match). You have `(N, M) * (N, M)` which doesn’t work (inner dimensions don’t match). One of those matrices should be probably be transposed.

---

<div class="post-metadata">

**Author:** ![shawngiese](https://avatars.discourse-cdn.com/v4/letter/s/b9bd4f/32.png) [@shawngiese](https://discourse.julialang.org/u/shawngiese)\
**Post date:** [June 10, 2021, 9:01am UTC](https://discourse.julialang.org/t/unclear-dimension-error-message/62659/3 "2021-06-10T09:01:18Z")

</div>

Thank you, that fixed it.
