Update to 2023
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user