For A Batch Of 100 Records How The Records Will Be Passed At A Time Or One By One?
Answer:
For a batch of 100 records in a neural network, all 100 records are passed through the network at the same time (in parallel), not one by one.
This is made possible through vectorized operations and the efficient handling of data by modern hardware like GPUs.
Why Are Records Processed Simultaneously?
How It Works Internally:
Summary:
How Individual Neurons Operation Happens:
- Yes, the operations we discussed (matrix multiplication, bias addition, and activation) apply to individual neurons as part of the neural network, but they are performed for all neurons in a layer simultaneously when processing a batch of data.
- Let’s clarify how each operation affects individual neurons:
Example:
- Suppose we have an input having 100 records and 4 features.
- Hence we will have [100*4] Metrix.
- We have 3 Hidden layers having 3 nodes each.
- For the first hidden layer we will have a weight Metrix of size [4*3].
- We will multiply the weights and add bias for each node.
- 1st Layer = [100*4] * [4*3] = [100*3].
- Hence the output from first layer will be [100*3] matrix.
- The weights for the second layer will be [3*3]..
- Now we will pass the output from 1ft layer to the input to the second layer.
- 2nd Layer = [100*3] * [3*3] = [100*3].
- In the final stage we will have weight of [3*1] and output from previous stage will be [100*3]. Now we will multiply together.
- Output : [100*3] * [3*1] = [100*1]
- Output : [100*1] means for input of 100 records we also got output of 100 records with one column value.
- Here 1 represents the individual outputs for individual input records.
