Skip to content

Commit

Permalink
running mean and variance should only be updated during training
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Nov 8, 2023
1 parent 5584960 commit 2bfcd1f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion metnet3_pytorch/metnet3_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@ def forward(

# use a batchnorm to normalize each channel to mean zero and unit variance

_ = self.batchnorm_hrrr(hrrr_target)
if self.training:
_ = self.batchnorm_hrrr(hrrr_target)

with freeze_batchnorm(self.batchnorm_hrrr) as frozen_batchnorm:
normed_hrrr_pred = frozen_batchnorm(hrrr_pred)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
setup(
name = 'metnet3-pytorch',
packages = find_packages(exclude=[]),
version = '0.0.5',
version = '0.0.6',
license='MIT',
description = 'MetNet 3 - Pytorch',
author = 'Phil Wang',
Expand Down

0 comments on commit 2bfcd1f

Please sign in to comment.