weecology / weecology/DeepForest

Explore the effect of batchnorm

Open
#477 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Ideas for Machine Learning!
Dominant language
Python
Stars
774
Forks
265
PR merge metrics
No merged PRs in 30d

Description

The batchnorm in the default retinanet model is a headache and a source of worry. We currently turn on batchnorm update statistics in validation step in main.py, but obviously don't allow the weights to update.

        #Get loss from "train" mode for batch norm statistics, but don't allow optimization
        self.model.train()
        with torch.no_grad():
            loss_dict = self.model.forward(images, targets)

This is awkward and looks questionable. Even for just appearances sake I'd like so hard evidence that batchnorm is a needed part of this. Relates to the whole 'batchnorm is evil magic' theme.

https://patrick-llgc.github.io/Learning-Deep-Learning/assets/papers/Devils_in_BatchNorm_yuxin_wu.pdf

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the validation step in main.py and the default RetinaNet model's batch normalization behavior. Run controlled experiments comparing validation with the current train-mode, no-gradient path against alternatives, using the linked batch normalization paper as background. Done means reporting hard evidence about whether batch normalization is needed and documenting the observed effect.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.