Skip to content

Instantly share code, notes, and snippets.

@VXU1230
Last active March 19, 2019 18:04
Show Gist options
  • Save VXU1230/77182cc7dfab78ac5456e3825b39e13b to your computer and use it in GitHub Desktop.
Save VXU1230/77182cc7dfab78ac5456e3825b39e13b to your computer and use it in GitHub Desktop.
Evaluate Model
def evaluate(model, loss_fn, target_data, context_data, label_data):
predictions = model(target_data, context_data)
batch_loss = loss_fn(label_data, predictions)
return batch_loss
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment