aboutsummaryrefslogtreecommitdiff
path: root/modules/xlmr_m18.py
diff options
context:
space:
mode:
Diffstat (limited to 'modules/xlmr_m18.py')
-rw-r--r--modules/xlmr_m18.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/xlmr_m18.py b/modules/xlmr_m18.py
index e3e81961..f6055504 100644
--- a/modules/xlmr_m18.py
+++ b/modules/xlmr_m18.py
@@ -4,8 +4,7 @@ import torch
from transformers.models.xlm_roberta.configuration_xlm_roberta import XLMRobertaConfig
from transformers import XLMRobertaModel,XLMRobertaTokenizer
from typing import Optional
-
-from modules.torch_utils import get_param
+from modules import torch_utils
class BertSeriesConfig(BertConfig):
@@ -71,7 +70,7 @@ class BertSeriesModelWithTransformation(BertPreTrainedModel):
self.post_init()
def encode(self,c):
- device = get_param(self).device
+ device = torch_utils.get_param(self).device
text = self.tokenizer(c,
truncation=True,
max_length=77,