Use SELU instead of ReLU

This commit is contained in:
Mattéo Delabre 2019-12-15 00:57:31 -05:00
parent 6d31ab3a13
commit 99c96162c0
Signed by: matteo
GPG Key ID: AE3FBD02DC583ABB
1 changed files with 3 additions and 7 deletions

View File

@ -36,14 +36,10 @@ class ConstellationNet(nn.Module):
for layer_size in encoder_layers_sizes:
encoder_layers.append(nn.Linear(prev_layer_size, layer_size))
encoder_layers.append(nn.ReLU())
encoder_layers.append(nn.SELU())
prev_layer_size = layer_size
encoder_layers += [
nn.Linear(prev_layer_size, 2),
nn.ReLU(),
nn.BatchNorm1d(2),
]
encoder_layers.append(nn.Linear(prev_layer_size, 2))
self.encoder = nn.Sequential(*encoder_layers)
self.channel = channel_model
@ -57,7 +53,7 @@ class ConstellationNet(nn.Module):
for layer_size in decoder_layers_sizes:
decoder_layers.append(nn.Linear(prev_layer_size, layer_size))
decoder_layers.append(nn.ReLU())
decoder_layers.append(nn.SELU())
prev_layer_size = layer_size
# Softmax is not used at the end of the network because the