Skip to content

Commit

Permalink
use the withbn option by default
Browse files Browse the repository at this point in the history
  • Loading branch information
segasai committed Nov 4, 2024
1 parent 9fc9d96 commit f9538aa
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py/rvspecfit/nn/NNInterpolator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import torch.nn as tonn
import torch
from collections import OrderedDict
import numpy as np

Expand All @@ -11,13 +10,15 @@ def __init__(self,
nlayers=None,
width=None,
npc=None,
npix=None):
npix=None,
widthbn=True):
super(NNInterpolator, self).__init__()
self.indim = indim
self.nlayers = nlayers
self.width = width
self.npc = npc
self.npix = npix
self.widthbn = widthbn
self.initLayers()

def initLayers(self):
Expand Down Expand Up @@ -50,7 +51,7 @@ def initLayers(self):
batchnorm_after_nl = True

for i in range(len(shapes)):
withbn = True
withbn = self.widthbn
if i == 0 or i == len(shapes) - 1:
withbn = False
if batchnorm_after_nl:
Expand Down

0 comments on commit f9538aa

Please sign in to comment.