Feature Extraction
PyTorch
Bioacoustics
ilyassmoummad commited on
Commit
ff3dfcb
·
verified ·
1 Parent(s): 3cc4661

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -59,7 +59,8 @@ from melspectrogram import MelSpectrogramProcessor # Import Mel spectrogram pro
59
  # Initialize the preprocessor and model
60
  preprocessor = MelSpectrogramProcessor()
61
  model = cvt13()
62
- model.load_state_dict(torch.load("protoclr.pth"))
 
63
  model.eval()
64
 
65
  # Load and preprocess a sample audio waveform
 
59
  # Initialize the preprocessor and model
60
  preprocessor = MelSpectrogramProcessor()
61
  model = cvt13()
62
+ model.load_state_dict(torch.load("protoclr.pth", map_location="cpu"))
63
+ # Optional: Move the model to GPU for faster processing if available using : model = model.to('cuda') , for instance.
64
  model.eval()
65
 
66
  # Load and preprocess a sample audio waveform