mat1 and mat2 shapes cannot be multiplied (288x256 and 2304x50)
时间: 2024-01-22 20:56:17 浏览: 23
The error message you are seeing indicates that you are trying to perform matrix multiplication between two matrices whose shapes are not compatible. In matrix multiplication, the number of columns in the first matrix must be equal to the number of rows in the second matrix.
In your case, you are trying to multiply a matrix with shape (288, 256) with a matrix with shape (2304, 50). The number of columns in the first matrix (256) does not match the number of rows in the second matrix (2304).
To fix this error, you need to reshape one of the matrices so that the number of columns in the first matrix matches the number of rows in the second matrix. Alternatively, you could transpose one of the matrices so that the number of rows and columns are swapped, allowing for valid matrix multiplication.