Skip to content

Instantly share code, notes, and snippets.

@shshemi
Last active August 28, 2019 10:55
Show Gist options
  • Save shshemi/4fe87a13007fce81097246caf43524ff to your computer and use it in GitHub Desktop.
Save shshemi/4fe87a13007fce81097246caf43524ff to your computer and use it in GitHub Desktop.
def metric_overprice(input_prices):
def overpricing(y_true, y_pred):
y_pred = K.round(y_pred)
return K.mean(K.batch_dot(y_pred, input_prices, 1) - K.batch_dot(y_true, input_prices, 1))
return overpricing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment