Spaces:
Runtime error
Runtime error
load model stata dict correctly
Browse files- __pycache__/pipeline.cpython-39.pyc +0 -0
- pipeline.py +1 -1
__pycache__/pipeline.cpython-39.pyc
CHANGED
Binary files a/__pycache__/pipeline.cpython-39.pyc and b/__pycache__/pipeline.cpython-39.pyc differ
|
|
pipeline.py
CHANGED
@@ -202,7 +202,7 @@ def load_audio_model():
|
|
202 |
#Load pretrained ckpt.
|
203 |
model_dict = model.state_dict()
|
204 |
ckpt = torch.load('pre_trained_DF_RawNet2.pth', map_location=torch.device('cpu'))
|
205 |
-
model
|
206 |
return model
|
207 |
|
208 |
audio_label_map = {
|
|
|
202 |
#Load pretrained ckpt.
|
203 |
model_dict = model.state_dict()
|
204 |
ckpt = torch.load('pre_trained_DF_RawNet2.pth', map_location=torch.device('cpu'))
|
205 |
+
model.load_state_dict(ckpt, model_dict)
|
206 |
return model
|
207 |
|
208 |
audio_label_map = {
|