Skip to content
Snippets Groups Projects
Commit 5a178fe9 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Convert to torch tensor.

parent 79090f87
No related branches found
No related tags found
No related merge requests found
...@@ -64,7 +64,9 @@ def predict_ERA5(net, ERA5_ds, predictand, batch_size=16, **kwargs): ...@@ -64,7 +64,9 @@ def predict_ERA5(net, ERA5_ds, predictand, batch_size=16, **kwargs):
elif predictand == 'pr': elif predictand == 'pr':
ds = { ds = {
# probability of precipitation # probability of precipitation
'prob': torch.sigmoid(target[:, 0, ...].squeeze()), 'prob': torch.sigmoid(
torch.as_tensor(target[:, 0, ...].squeeze(),
dtype=torch.float32)).numpy(),
# amount of precipitation: expected value of gamma distribution # amount of precipitation: expected value of gamma distribution
# pr = shape * scale # pr = shape * scale
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment