d477e70d888d8501cc0834c47f399a4f65a439d9,senteval/tools/classifier.py,PyTorchClassifier,prepare_split,#PyTorchClassifier#,39
Before Change
trainX = torch.FloatTensor(trainX).cuda()
trainy = torch.LongTensor(trainy).cuda()
devX = torch.FloatTensor(devX).cuda()
devy = torch.LongTensor(devy).cuda()
else:
trainX = torch.FloatTensor(trainX)
trainy = torch.LongTensor(trainy)
devX = torch.FloatTensor(devX)
After Change
trainX = torch.from_numpy(trainX).to(device, dtype=torch.float32)
trainy = torch.from_numpy(trainy).to(device, dtype=torch.int64)
devX = torch.from_numpy(devX).to(device, dtype=torch.float32)
devy = torch.from_numpy(devy).to(device, dtype=torch.int64)
return trainX, trainy, devX, devy
def fit(self, X, y, validation_data=None, validation_split=None,
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: facebookresearch/SentEval
Commit Name: d477e70d888d8501cc0834c47f399a4f65a439d9
Time: 2018-07-13
Author: asabran@fb.com
File Name: senteval/tools/classifier.py
Class Name: PyTorchClassifier
Method Name: prepare_split
Project Name: facebookresearch/SentEval
Commit Name: d477e70d888d8501cc0834c47f399a4f65a439d9
Time: 2018-07-13
Author: asabran@fb.com
File Name: senteval/tools/classifier.py
Class Name: PyTorchClassifier
Method Name: trainepoch