Fix batch norm for conv2d
* Change tensorboard folders * Save root scripts in output code
This commit is contained in:
parent
976f5cef49
commit
42ae4474dd
2 changed files with 10 additions and 7 deletions
|
|
@ -85,7 +85,7 @@ class Conv2d(Layer):
|
|||
self.batch_norm = nn.BatchNorm2d(
|
||||
out_channels,
|
||||
momentum=Layer.BATCH_NORM_MOMENTUM,
|
||||
track_running_stats=not Layer.BATCH_NORM_TRAINING) if self.batch_norm else None
|
||||
track_running_stats=Layer.BATCH_NORM_TRAINING) if self.batch_norm else None
|
||||
|
||||
def forward(self, input_data: torch.Tensor) -> torch.Tensor:
|
||||
return super().forward(self.conv(input_data))
|
||||
|
|
@ -118,7 +118,7 @@ class Deconv2d(Layer):
|
|||
self.batch_norm = nn.BatchNorm2d(
|
||||
out_channels,
|
||||
momentum=Layer.BATCH_NORM_MOMENTUM,
|
||||
track_running_stats=not Layer.BATCH_NORM_TRAINING) if self.batch_norm else None
|
||||
track_running_stats=Layer.BATCH_NORM_TRAINING) if self.batch_norm else None
|
||||
|
||||
def forward(self, input_data: torch.Tensor) -> torch.Tensor:
|
||||
return super().forward(self.deconv(input_data))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue