Open malekiamir opened 3 years ago
thanks for your reply @gustavoplensack, I might describe the problem not very clear. I have the .pth file and the problem is how to use it. I just know that the input shape has 3 dimensions but I don't know what are these dimensions.
so if I have a consumer's usage data in an array for example, and the model is ready. what input should I feed to the model, like model(sth), to get the prediction for that consumer?
To evaluate the that for a consumer, your input sth
should be in the shape of a 3D tensor. The original input (a time series) is converted into a matrix (2D). The 3D data is built with a binary mask with the same shape as the original data matrix stacked over the original data.
More details about the preprocessing and transformations are provided at section 3.1 and 3.2 of this paper and the code that implements this preprocessing from the download of the original dataset to the input to the model is implemented at:
data.py - more precisely at download_data
and get_processed_dataset
.
dataset.py - more precisely at `FraudDataset
's constructor.
Thanks for your response,
Now I have the output tensor and it is like this :
tensor([[ 0.8610, -1.5230],
[ 2.9618, -2.5590]], device='cuda:0', grad_fn=
for x, y in dataset_train: xnan = x.copy() x[np.isnan(x)] = 0. xnan[~np.isnan(xnan)] = 0. xnan[np.isnan(xnan)] = 1. x = np.stack((x, xnan), axis=1) input = torch.Tensor(x) output = model(input.cuda()) print(output) break
I want to test it on a single object of the dataset but as I said, instead of the classification output, I have The output tensor!
Thanks for your time
Hi I'm trying to use your model in a digital meter project, and I don't have any experience with PyTorch. I've trained the model and I can load it but I don't know how to feed the model to predict. I would be glad if you please help me with this. Thanks for your great repo