Skip to content

Commit

Permalink
Merge pull request #210 from wurining/fix-conv3d-bug
Browse files Browse the repository at this point in the history
fix that cannot correctly set bn layer channels
  • Loading branch information
MaxFBurg authored Mar 7, 2024
2 parents a64a9cc + d59eaab commit a71eb25
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neuralpredictors/layers/cores/conv3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def __init__(
padding=(0, input_kernel[1] // 2, input_kernel[2] // 2) if self.padding else 0,
)

self.add_bn_layer(layer=layer, hidden_channels=hidden_channels[0])
self.add_bn_layer(layer=layer, hidden_channels=self.hidden_channels[0])

if layers > 1 or self.final_nonlinearity:
if hidden_nonlinearities == "adaptive_elu":
Expand All @@ -191,7 +191,7 @@ def __init__(
padding=(0, self.hidden_kernel[l][1] // 2, self.hidden_kernel[l][2] // 2) if self.padding else 0,
)

self.add_bn_layer(layer=layer, hidden_channels=hidden_channels[l + 1])
self.add_bn_layer(layer=layer, hidden_channels=self.hidden_channels[l + 1])

if self.final_nonlinearity or l < self.layers:
if hidden_nonlinearities == "adaptive_elu":
Expand Down Expand Up @@ -386,7 +386,7 @@ def __init__(
dilation=(self.temporal_dilation, 1, 1),
)

self.add_bn_layer(layer=layer, hidden_channels=hidden_channels[0])
self.add_bn_layer(layer=layer, hidden_channels=self.hidden_channels[0])

if layers > 1 or final_nonlin:
if hidden_nonlinearities == "adaptive_elu":
Expand Down Expand Up @@ -417,7 +417,7 @@ def __init__(
dilation=(self.hidden_temporal_dilation[l], 1, 1),
)

self.add_bn_layer(layer=layer, hidden_channels=hidden_channels[l + 1])
self.add_bn_layer(layer=layer, hidden_channels=self.hidden_channels[l + 1])

if final_nonlin or l < self.layers:
if hidden_nonlinearities == "adaptive_elu":
Expand Down

0 comments on commit a71eb25

Please sign in to comment.