Last active
August 28, 2019 10:55
-
-
Save shshemi/542f8aaacbc0e30ef6c973d42a2e8fc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def metric_space_violation(input_weights): | |
def space_violation(y_true, y_pred): | |
y_pred = K.round(y_pred) | |
return K.mean(K.maximum(K.batch_dot(y_pred, input_weights, 1) - 1, 0)) | |
return space_violation |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment