2
I think the problem is in your predict method:
(self.bias + self.weights * inputs).sum(axis=1)
adds the bias to both of the weight*input values before summing (the arrays are broadcast to the same shape). Hence why the 2*intercept makes things match up.
1
I will answer your questions one by one:
By hidden layer we mean the layer that is inbetween the input and output. If number of layers = 1 with 10 hidden neurons (as shown in second figure) then is it essentially a neural network which is termed as an MLP. Is my understanding correct?
The fundamental building block of a Neural Network is the perceptron. It'...
Only top voted, non community-wiki answers of a minimum length are eligible
Related Tags
perceptron × 81neural-network × 35
machine-learning × 32
deep-learning × 11
mlp × 9
classification × 8
python × 7
svm × 5
gradient-descent × 5
scikit-learn × 4
image-classification × 3
linear-regression × 3
training × 3
regularization × 3
keras × 2
regression × 2
optimization × 2
numpy × 2
terminology × 2
bias × 2
convergence × 2
dataset × 1
cnn × 1
feature-selection × 1
logistic-regression × 1