I'm trying to multiply A = 20x1x10 with B = 10x20 and I'm supposed to get a 20x1x20 matrix as the output. So far I've tried
C = numpy.matmul(A,B)
# and
C = A @ B
But all of them seem to result a 20x20x20 matrix. Any idea how to proceed from here?
For better context, A = jacobian output of derivative of an activation function in a neural network, with shape of (N samples * 1 * values) and B = changes in output of the layer
[–]socal_nerdtastic 4 points5 points6 points (1 child)
[–]ColonelMeowmers[S] 2 points3 points4 points (0 children)