Open JosePeeterson opened 1 year ago
Need to cast samples to torch.tensor as shown below. Then save this base_metrics.py and rerun above code.
except NotImplementedError: # resort to derive quantiles empirically samples = torch.sort(self.sample(y_pred, n_samples), -1).values quantiles = torch.quantile(torch.as_tensor(samples,dtype=torch.float32), torch.as_tensor(quantiles, ,dtype=torch.float32,device=samples.device), dim=2).permute(1, 2, 0) return quantiles
Expected behavior
No Error
Actual behavior
The Error is
How do I set them to be of same datatype? This is happening internally. I do not have control over this. I am not using any GPUs.
The link to the .csv file with input data is https://github.com/JosePeeterson/Demand_forecasting The data is just sampled from a negative binomila distribution wiht parameters (9,0.5) every 4 hours. the time inbetween is all zero. I just want to see if DeepAR can learn this pattern.
Code to reproduce the problem