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