Skip to content
This repository has been archived by the owner on Jun 2, 2023. It is now read-only.

Commit

Permalink
Merge branch 'adding_da_to_models' of github.com:USGS-R/river-dl into…
Browse files Browse the repository at this point in the history
… adding_da_to_models
  • Loading branch information
jsadler2 committed Jun 4, 2021
2 parents 3e54465 + ab4cff1 commit e939460
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions river_dl/loss_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,8 @@ def nnse_one_var_samplewise(data, y_pred, var_idx, tasks):


def y_data_components(data, y_pred, var_idx, tasks):
if tasks == 2:
weights = data[:, :, -2:]
y_true = data[:, :, :-2]
else:
weights = data[:, :, -1:]
y_true = data[:, :, :-1]
weights = data[:, :, -tasks:]
y_true = data[:, :, :-tasks]

# ensure y_pred, weights, and y_true are all tensors the same data type
y_true = tf.convert_to_tensor(y_true)
Expand Down

0 comments on commit e939460

Please sign in to comment.