ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 100 is different from 2)
i will give that a try. i just cancelled this and two other specializations due to cost, so i can not access now, but i will when i come back. thank you.
seems like i have access for a t leas a few more days. i get the folloewin:
using w and X gets a value error the a dimension mismatch.
using w.T and X gets a value error the a dimension mismatch.
using w and X.T gets type error the unsuported format string
using w T and X.T gets type error the unsuported format string
using X and w gets a type error the unsuported format string
using X.T and w gets a value error the a dimension mismatch.
using X.T and w.T gets a value error the a dimension mismatch.
using X and w.T gets ats a type error the unsuported format string
Please post a screen capture image showing your examples in action, not just a lot of text. It will be easier for me to investigate what you’re asking about.
ValueError Traceback (most recent call last)
in
4 initial_w = np.zeros(n)
5 initial_b = 0.
----> 6 cost = compute_cost(X_train, y_train, initial_w, initial_b)
7 print(‘Cost at initial w and b (zeros): {:.3f}’.format(cost))
in compute_cost(X, y, w, b, *argv)
20 print(‘w,x,b’,type(w),type(X),type(b))
21 print(‘w,x,b’,w.shape,X.shape,b)
—> 22 z=n …
23 f=si …
24 print(‘f’,f.shape,f)
ValueError: matmul: Input operand 1 has a mismatch in its core dimension 0, with gufunc signature (n?,k),(k,m?)->(n?,m?) (size 100 is different from 2)
A screen capture image would be better, I don’t understand all those … and ?
I think I answered your question about np.matmul() already. You have the operands in the wrong order. If you have np.matmul(w,x) and get an error, then try np.matmul(x,w).