Update to 2023

This commit is contained in:
Benjamin Elizalde
2023-09-26 14:37:20 -07:00
parent 9d4006b773
commit 1ea0905552
16 changed files with 1858 additions and 125 deletions
+3
View File
@@ -2,10 +2,13 @@ import torch
import torch.nn as nn
import torch.nn.functional as F
from torchlibrosa.stft import Spectrogram, LogmelFilterBank
from models.htsat import HTSATWrapper
def get_audio_encoder(name: str):
if name == "Cnn14":
return Cnn14
elif name == "HTSAT":
return HTSATWrapper
else:
raise Exception('The audio encoder name {} is incorrect or not supported'.format(name))