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

Pass loss function to predict.

parent 61c70f15
Branches
No related tags found
No related merge requests found
......@@ -91,8 +91,9 @@ if __name__ == '__main__':
LogConfig.init_log('Predicting period: {}'.format(
' - '.join([str(dates[0]), str(dates[-1])])))
ref_ds = Era5_ds.sel(time=dates)
trg_ds.append(predict_ERA5(net, ref_ds, PREDICTAND, normalize=NORM,
batch_size=BATCH_SIZE, doy=DOY))
trg_ds.append(predict_ERA5(net, ref_ds, PREDICTAND, LOSS,
normalize=NORM, batch_size=BATCH_SIZE,
doy=DOY))
# merge predictions for entire validation period
LOGGER.info('Merging reference periods ...')
......
......@@ -99,8 +99,9 @@ if __name__ == '__main__':
predictors = Era5_ds.isel(time=v)
# predict current season
predictand = predict_ERA5(net, predictors, PREDICTAND, normalize=NORM,
batch_size=BATCH_SIZE, doy=DOY)
predictand = predict_ERA5(net, predictors, PREDICTAND,LOSS,
normalize=NORM, batch_size=BATCH_SIZE,
doy=DOY)
# append prediction to target dataset
trg_ds.append(predictand)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment