mat1 and mat2 shapes cannot be multiplied (100x2048 and 128x512)
时间: 2024-01-22 08:53:46 浏览: 24
The error message you are seeing indicates that you are attempting to perform matrix multiplication between two matrices with incompatible sizes. Specifically, you are trying to multiply a matrix with 100 rows and 2048 columns by a matrix with 128 rows and 512 columns.
In order for matrix multiplication to be possible, the number of columns in the first matrix must be equal to the number of rows in the second matrix. In this case, 2048 is not equal to 128, so the operation cannot be performed.
To resolve this issue, you may need to either transpose one of the matrices or reshape it so that the dimensions match up. Alternatively, you may need to adjust your code to use a different approach that is compatible with the shapes of your matrices.