Hi walker, I don't know if you will see this or not but I have some questions about brain.py.
def dense(X, units, params):
# Reshape the parameters from a flat array to a matrix of weights and biases
reshaped = params.reshape(units, X.shape[1] + 1)
# Apply the weights and biases matrix
return np.dot(X, reshaped[:, :-1].transpose()) + reshaped[:, -1]
For example, if my x data was (700,4) which has 4 features, wouldn't the starting params be (4,) which is a 1d array?
Suppose, I also want 5 output for my neural networks. Then according to your code, reshaped = params.reshape(5,4+1). But this is not possible since you can't reshape an array that's not the same size as the output array(reshaped). 4 is not equal to 25.
Thanks.
Hi walker, I don't know if you will see this or not but I have some questions about brain.py.
def dense(X, units, params):
# Reshape the parameters from a flat array to a matrix of weights and biases
reshaped = params.reshape(units, X.shape[1] + 1)
# Apply the weights and biases matrix
return np.dot(X, reshaped[:, :-1].transpose()) + reshaped[:, -1]
For example, if my x data was (700,4) which has 4 features, wouldn't the starting params be (4,) which is a 1d array?
Suppose, I also want 5 output for my neural networks. Then according to your code, reshaped = params.reshape(5,4+1). But this is not possible since you can't reshape an array that's not the same size as the output array(reshaped). 4 is not equal to 25.
Thanks.