I know these are the questions I'm asking from months now, but I still have problems:
Matlab:
gy=tanh(alpha.*xup.'*w)
This is how I translated it to Python:
GY = np.tanh(np.multiply(np.multiply(Alpha, np.transpose(XUp)), WSeg)
It looks correct, except for the fact that GY is different from Matlab to Python. In Matlab - with sz = size(gy) - it says:
sz =
1 2
In Python - with print(GY.shape) - it says:
(2, 128)
what's wrong ? I can assure you that the variables used match perfectly since this point.