Update model_hf.py
Browse files- model_hf.py +1 -1
model_hf.py
CHANGED
@@ -21,7 +21,7 @@ class SSLModel(nn.Module):
|
|
21 |
def __init__(self,device):
|
22 |
super(SSLModel, self).__init__()
|
23 |
|
24 |
-
cp_path = '
|
25 |
model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([cp_path])
|
26 |
self.model = model[0]
|
27 |
self.model_device=device
|
|
|
21 |
def __init__(self,device):
|
22 |
super(SSLModel, self).__init__()
|
23 |
|
24 |
+
cp_path = 'xlsr2_300m.pt' # Change the pre-trained XLSR model path.
|
25 |
model, cfg, task = fairseq.checkpoint_utils.load_model_ensemble_and_task([cp_path])
|
26 |
self.model = model[0]
|
27 |
self.model_device=device
|