d477e70d888d8501cc0834c47f399a4f65a439d9,senteval/tools/classifier.py,PyTorchClassifier,prepare_split,#PyTorchClassifier#,39

Before Change


        else:
            trainX = torch.FloatTensor(trainX)
            trainy = torch.LongTensor(trainy)
            devX = torch.FloatTensor(devX)
            devy = torch.LongTensor(devy)

        return trainX, trainy, devX, devy

After Change


            trainX, trainy = X[trainidx], y[trainidx]
            devX, devy = X[devidx], y[devidx]

        device = torch.device("cpu") if self.cudaEfficient else torch.device("cuda")

        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)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: cbcc3f315c653706ceded6ba42f222616322a3f2
Time: 2018-04-25
Author: max.lapan@gmail.com
File Name: ch03/03_atari_gan.py
Class Name:
Method Name:


Project Name: HsinYingLee/DRIT
Commit Name: fad73753f836de5cdd08d8e23d26c1170d19b386
Time: 2018-04-09
Author: hytseng0509@gmail.com
File Name: src/dataset_unpair.py
Class Name: dataset_unpair
Method Name: __getitem__