From 275c503b8e2d82e07bc2cac7c2f76213ce04b5f5 Mon Sep 17 00:00:00 2001
From: Paul Best <paul.best@lis-lab.fr>
Date: Wed, 28 Sep 2022 11:46:16 +0200
Subject: [PATCH] add globicephala to models.py

---
 models.py | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/models.py b/models.py
index 730b943..488f054 100644
--- a/models.py
+++ b/models.py
@@ -184,5 +184,47 @@ get = {
                 nn.AdaptiveMaxPool2d(output_size=(1, 1))
             )
         )
+    },
+    'globicephala': {
+        'weights': 'sparrow_dolphin_train8_pcen_conv2d_noaugm_bs32_lr_GLOBI.005_TRAIN_.stdc',
+        'fs': 48000,
+        'archi': nn.Sequential(
+            nn.Sequential(
+                STFT(2048, 512),
+                MelFilter(48000, 2048, 128, 2000, 6000),
+                PCENLayer(128)
+            ),
+            nn.Sequential(
+                nn.Conv2d(1, 32, 3, bias=False),
+                nn.BatchNorm2d(32),
+                nn.LeakyReLU(0.01),
+                nn.Conv2d(32, 32, 3,bias=False),
+                nn.BatchNorm2d(32),
+                nn.MaxPool2d(3),
+                nn.LeakyReLU(0.01),
+                nn.Conv2d(32, 32, 3, bias=False),
+                nn.BatchNorm2d(32),
+                nn.LeakyReLU(0.01),
+                nn.Conv2d(32, 32, 3, bias=False),
+                nn.BatchNorm2d(32),
+                nn.LeakyReLU(0.01),
+                nn.Conv2d(32, 64, (19, 3), bias=False),
+                nn.BatchNorm2d(64),
+                nn.MaxPool2d(3),
+                nn.LeakyReLU(0.01),
+                nn.Dropout(p=.5),
+                nn.Conv2d(64, 256, (1, 6), bias=False),  # for 80 bands
+                nn.BatchNorm2d(256),
+                nn.LeakyReLU(0.01),
+                nn.Dropout(p=.5),
+                nn.Conv2d(256, 64, 1, bias=False),
+                nn.BatchNorm2d(64),
+                nn.LeakyReLU(0.01),
+                nn.Dropout(p=.5),
+                nn.Conv2d(64, 1, 1, bias=False),
+                nn.MaxPool2d((6, 1)),
+                nn.AdaptiveMaxPool2d(output_size=(1, 1))
+            )
+        )
     }
 }
-- 
GitLab