Remove move to device in NER.
import logging
import numpy as np
import torch
-import torch.nn as nn
from collections import Iterable
from torch.utils.data import TensorDataset
@@ -360,10 +359,6 @@ class TokenClassifier(Transformer):
"""
device, num_gpus = get_device(num_gpus=num_gpus, local_rank=-1)
- if isinstance(self.model, nn.DataParallel):
- self.model.module.to(device)
- else:
- self.model.to(device)
preds = list(
super().predict(
