问题
I tried to run this code with my data but I obtained this error:
"ValueError: shapes (3,126) and (3,126) not aligned: 126 (dim 1) != 3 (dim 0)"
I'm doing the neural network and I don't want to use libraries which are suitable for Neural Network like TensorFlow.
X = pd.read_excel(r"C:\\users\Hasan\Desktop\ANN\x.xlsx")
y = pd.read_excel(r"C:\\users\Hasan\Desktop\ANN\y.xlsx")
xPredicted = pd.read_excel(r"C:\\users\Hasan\Desktop\ANN\xpredict.xlsx")
self.W1 = np.random.randn(self.inputSize, self.hiddenSize)
self.W2 = np.random.randn(self.hiddenSize, self.outputSize)
self.z = np.dot(X, self.W1)
self.z2 = self.sigmoid(self.z) # activation function
self.z3 = np.dot(self.z2, self.W2)
o = self.sigmoid(self.z3) # final activation function
ValueError: shapes (3,126) and (3,126) not aligned: 126 (dim 1) != 3 (dim 0)
来源:https://stackoverflow.com/questions/56197904/alignment-in-dimension-of-matrices