CodingTrain / Toy-Neural-Network-JS

Neural Network JavaScript library for Coding Train tutorials
MIT License
426 stars 242 forks source link

Bias variable names are a little confusing #128

Open 435vic opened 5 years ago

435vic commented 5 years ago

The bias nodes exist only in pre-output layers, but for example, the weight connected the the hidden bias neuron is called bias_o. This confused me a lot, so I think it is easier to understand bias_o as bias_h and bias_h as bias_i. This way I think it's easier to read the code that updates the biases, since the gradient from the output layer, for example, is mapped to the bias in the previous layer, as the process of backpropagation might suggest by its name.