czyoung commited on
Commit
a865f85
·
verified ·
1 Parent(s): 2b2d109

Replace str with torch.device

Browse files
Files changed (1) hide show
  1. sonogram.py +2 -1
sonogram.py CHANGED
@@ -8,6 +8,7 @@ from pyannote.core import Segment
8
  from pyannote.audio.models.segmentation import PyanNet
9
  from pyannote.audio import Inference
10
  from pyannote.pipeline.parameter import ParamDict
 
11
 
12
  class Sonogram():
13
 
@@ -226,5 +227,5 @@ class Sonogram():
226
  print(f"Sonogram moved to {self.device}")
227
 
228
  def toCPU(self):
229
- self.pipeline.to('cpu')
230
  print(f"Sonogram moved to CPU")
 
8
  from pyannote.audio.models.segmentation import PyanNet
9
  from pyannote.audio import Inference
10
  from pyannote.pipeline.parameter import ParamDict
11
+ import torch
12
 
13
  class Sonogram():
14
 
 
227
  print(f"Sonogram moved to {self.device}")
228
 
229
  def toCPU(self):
230
+ self.pipeline.to(torch.device('cpu'))
231
  print(f"Sonogram moved to CPU")