Data Science Asked by Hiro Nakagame on January 23, 2021
When NN is construsted, batch size is not defined and place holder is used and its summary(tensorfow) shows the batch size as None.
This is useful because you can change batch size later.
In case of a simple model with 10 input features, 1 hidden layers with 10 neurons and output layer, the shape of the hidden layer would be (None, 10), which means if the batch size is 20, the hidden layer would have the shape of (20, 10).
When the model is used to predict for a single output, with shape(10, 1), how does the math work?
I guess you have a confusion here. The None part represents the number of samples.
For example if you have a neural network with architecture 100-50-10, it means that you have
So if youre feeding a single input sample the shapes would be:
(1,100)[Input] => (1,100)(100,50) = (1,50)[Hidden Layer] => (1,50)*(50,10)=(1,10)[Output Layer]
Correct answer by Anoop A Nair on January 23, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP