<p>It's not possible to use batch normalization with a batch size of 1. Batch normalization requires you to calculate the variance of activation values in the current batch, and variance is undefined for a sample of size 1.</p>

CC BY-SA 4.0
2024-02-15T17:54:07.067Z
Why it is undefined? It is zero.
Antonios Sarikas
CC BY-SA 4.0
2024-02-18T00:37:16.883Z
The sample variance formula has a denominator of N - 1. When N = 1, N - 1 = 0, and division by 0 is undefined. @adosar
Johann
CC BY-SA 4.0
2023-11-06T07:40:49.920Z
2023-11-06T07:40:49.920Z
Johann
<p>I am interested in your opinion on the topic if you think that it makes sense to use batch normalization layer in a network that is trained with a batch size of 1. This is a special case as part of an experiment. What effects can be expected?</p>

<neural-networks><batch-normalization><residual-networks><normalisation>
Does it make sense to apply batch normalization to a batch size of 1?
user3352632
# Does it make sense to apply batch normalization to a batch size of 1?

(Asked by: username_0 on 2021-05-24)

I am interested in your opinion on the topic if you think that it makes sense to use batch normalization layer in a network that is trained with a batch size of 1. This is a special case as part of an experiment. What effects can be expected?

**Tags:** neural-networks, batch-normalization, residual-networks, normalisation


---

## 1 answers

### Answer by username_1 on 2023-11-06. Score: 3

It's not possible to use batch normalization with a batch size of 1. Batch normalization requires you to calculate the variance of activation values in the current batch, and variance is undefined for a sample of size 1.

> **Comments:**
> **username_2**: Why it is undefined? It is zero.  
> **username_1**: The sample variance formula has a denominator of N - 1. When N = 1, N - 1 = 0, and division by 0 is undefined. @adosar  

---

