awslabs / awslabs/aws-cv-task2vec

Are you sure .train() puts batch norm in eval mode? I'd assume that means train...

Open
#23 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
126
Forks
31
PR merge metrics
No merged PRs in 30d

Description

https://github.com/awslabs/aws-cv-task2vec/blob/c5795e55ba773f9845498091a90eee2fcba5da31/task2vec.py#L71

```python
# Fix batch norm running statistics (i.e., put batch_norm layers in eval mode)
self.model.train()
```

is this truly correct?

.train() usually puts layers in training mode. So for batch norm what it means is that it start collecting running statistics but uses mini-batch stats if I remember correctly, while in .eval() it uses the saved running stats. Right?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.