Feature Extraction
PyTorch
Bioacoustics
ilyassmoummad commited on
Commit
25809e1
·
verified ·
1 Parent(s): e1e124b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -59,7 +59,7 @@ from melspectrogram import MelSpectrogramProcessor # Import Mel spectrogram pro
59
  # Initialize the preprocessor and model
60
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
61
  preprocessor = MelSpectrogramProcessor(device=device)
62
- model = cvt13().to(device)
63
 
64
  # Load weights trained using Cross-Entropy
65
  model.load_state_dict(torch.load("ce.pth", map_location="cpu")['encoder'])
@@ -74,6 +74,7 @@ model.load_state_dict(torch.load("supcon.pth", map_location="cpu"))
74
  model.load_state_dict(torch.load("protoclr.pth", map_location="cpu"))
75
 
76
  # Optional: Move the model to GPU for faster processing if available using : model = model.to('cuda') , for instance.
 
77
  model.eval()
78
 
79
  # Load and preprocess a sample audio waveform
 
59
  # Initialize the preprocessor and model
60
  device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
61
  preprocessor = MelSpectrogramProcessor(device=device)
62
+ model = cvt13()
63
 
64
  # Load weights trained using Cross-Entropy
65
  model.load_state_dict(torch.load("ce.pth", map_location="cpu")['encoder'])
 
74
  model.load_state_dict(torch.load("protoclr.pth", map_location="cpu"))
75
 
76
  # Optional: Move the model to GPU for faster processing if available using : model = model.to('cuda') , for instance.
77
+ model = model.to(device)
78
  model.eval()
79
 
80
  # Load and preprocess a sample audio waveform