From fa1f80ba70354d77a4ab2c2058a68891d17e2a7b Mon Sep 17 00:00:00 2001 From: David Rotermund <54365609+davrot@users.noreply.github.com> Date: Tue, 25 Jul 2023 11:06:08 +0200 Subject: [PATCH] Add files via upload --- functions/make_cnn.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/functions/make_cnn.py b/functions/make_cnn.py index 49d9edf..6d090b6 100644 --- a/functions/make_cnn.py +++ b/functions/make_cnn.py @@ -50,6 +50,16 @@ def make_cnn( setting_understood = True assert setting_understood + if conv_0_enable_softmax: + cnn.append( + SoftmaxPower( + dim=1, + power=conv_0_power_softmax, + mean_mode=conv_0_meanmode_softmax, + no_input_mode=conv_0_no_input_mode_softmax, + ) + ) + setting_understood = False if pooling_type.upper() == str("max").upper(): cnn.append(torch.nn.MaxPool2d(kernel_size=mp_1_kernel_size, stride=mp_1_stride)) @@ -61,15 +71,6 @@ def make_cnn( setting_understood = True assert setting_understood - if conv_0_enable_softmax: - cnn.append( - SoftmaxPower( - dim=1, - power=conv_0_power_softmax, - mean_mode=conv_0_meanmode_softmax, - no_input_mode=conv_0_no_input_mode_softmax, - ) - ) # Changing structure for i in range(1, len(conv_out_channels_list)):