Kurz vorm durchdrehen
This commit is contained in:
@@ -4,11 +4,11 @@ import torch
|
||||
from torch import nn
|
||||
from lib.modules.utils import AutoPad, Interpolate
|
||||
|
||||
|
||||
#
|
||||
# Sub - Modules
|
||||
###################
|
||||
|
||||
|
||||
class ConvModule(nn.Module):
|
||||
|
||||
@property
|
||||
@@ -60,7 +60,7 @@ class DeConvModule(nn.Module):
|
||||
def __init__(self, in_shape, conv_filters=3, conv_kernel=5, conv_stride=1, conv_padding=0,
|
||||
dropout: Union[int, float] = 0, autopad=False,
|
||||
activation: Union[None, nn.Module] = nn.ReLU, interpolation_scale=None,
|
||||
use_bias=True, normalize=False):
|
||||
use_bias=True, use_norm=False):
|
||||
super(DeConvModule, self).__init__()
|
||||
in_channels, height, width = in_shape[0], in_shape[1], in_shape[2]
|
||||
self.padding = conv_padding
|
||||
@@ -70,7 +70,7 @@ class DeConvModule(nn.Module):
|
||||
|
||||
self.autopad = AutoPad() if autopad else lambda x: x
|
||||
self.interpolation = Interpolate(scale_factor=interpolation_scale) if interpolation_scale else lambda x: x
|
||||
self.norm = nn.BatchNorm2d(in_channels, eps=1e-04, affine=False) if normalize else lambda x: x
|
||||
self.norm = nn.BatchNorm2d(in_channels, eps=1e-04, affine=False) if use_norm else lambda x: x
|
||||
self.dropout = nn.Dropout2d(dropout) if dropout else lambda x: x
|
||||
self.de_conv = nn.ConvTranspose2d(in_channels, self.conv_filters, conv_kernel, bias=use_bias,
|
||||
padding=self.padding, stride=self.stride)
|
||||
|
||||
Reference in New Issue
Block a user