Question: Error message from LinearAlgebra DimensionMismatch: incompatible dimensions for matrix multiplication: tried to multiply a matrix of size (5, 5) with a matrix of size (1100,
Error message from LinearAlgebra DimensionMismatch: incompatible dimensions for matrix multiplication: tried to multiply a matrix of size (5, 5) with a matrix of size (1100, 5). The second dimension of the first matrix: 5, does not match the first dimension of the second matrix: 1100. Stack trace Here is what happened, the most recent locations are first: matmul_size_check_error(sizeA::Tuple{...}, sizeB::Tuple{...}) ...show types... from LinearAlgebra matmul.jl:431 matmul_size_check from matmul.jl:418 matmul_size_check from matmul.jl:441 gemm_wrapper! from matmul.jl:797 _syrk_herk_gemm_wrapper! from matmul.jl:527 generic_matmatmul_wrapper!(C::Matrix{...}, tA::Char, tB::Char, A::Matrix{...}, B::Matrix{...}, ::Bool, ::Bool, val::Val{...}) ...show types... from LinearAlgebra matmul.jl:507 _mul! from matmul.jl:328 mul! from matmul.jl:297 mul! from matmul.jl:265 * from matmul.jl:136 rrule from arraymath.jl:64 rrule from rules.jl:138 chain_rrule from chainrules.jl:234 macro expansion from interface2.jl _pullback(::Zygote.Context{...}, ::typeof(*), ::Matrix{...}, ::Matrix{...}) ...show types... from interface2.jl:81 dense_layer from Other cell: line 2 function dense_layer(x::AbstractMatrix{T}, p) where T<:abstractfloat w b="p" unpack the vector p into matrix and . end show more>
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
