Open dorienh opened 3 years ago
TypeError Traceback (most recent call last) <ipython-input-9-20bb03f284db> in <module>() 1 model.load(checkpointdir=checkpointdir) 2 ----> 3 model.predict(testdata=process.X_test, target=process.y_test) /content/drive/My Drive/herremans_data/src/wavenetmodel.py in predict(self, testdata, target) 147 self.model.eval() 148 testdata = testdata.to(self.device) --> 149 predictions = self.model(testdata.float()).detach().numpy() 150 idxs = np.unique(np.where(np.isnan(predictions))[0]).tolist() 151 preds = np.delete(predictions.copy(), idxs, axis=0) TypeError: can't convert cuda:0 device type tensor to numpy. Use Tensor.cpu() to copy the tensor to host memory first.
This error is still present.