In the NN the input layer has size 2 and the output size 1. This is also the size of input and output. The grader marks this as wrong. According to the grader the input size is 5 and the output size is 2 what am I missing
I’m not 100% sure which case you are talking about, but the general point to be made is that there are test cases for each individual function, e.g. layer_sizes
, which are general purpose tests and do not necessarily match the actual size of the “real” data that we are using in this assignment.
The “helper” functions that we are building here are general purpose functions that could be used in other assignments, so it’s a mistake to “hard-code” things to match the specific data we are working with here. In the case of the layer_sizes
function, the only thing we have to “hard-code” here is the size of the hidden layer to 4, because we cannot deduce that from the shape of our input data.
The grader tests your code using totally different tests, with different sizes than are in the notebook’s tests.
Your code should work with any variations of sizes.