Skip to content
Snippets Groups Projects
Commit 88364fe8 authored by Tim O'Donnell's avatar Tim O'Donnell
Browse files

fix

parent 2b6fbe84
No related branches found
No related tags found
No related merge requests found
......@@ -130,9 +130,6 @@ class MSEWithInequalitiesAndMultipleOutputs(object):
def loss(y_true, y_pred):
from keras import backend as K
#y_true = K.print_tensor(y_true, "y_true1")
#y_pred = K.print_tensor(y_pred, "y_pred1")
y_true = K.flatten(y_true)
output_indices = y_true // 10
......@@ -143,8 +140,6 @@ class MSEWithInequalitiesAndMultipleOutputs(object):
ordinals = K.arange(K.shape(y_true)[0])
flattened_indices = (
ordinals * y_pred.shape[1] + K.cast(output_indices, "int32"))
import tensorflow
#flattened_indices = tensorflow.Print(flattened_indices, [flattened_indices], "flattened_indices", summarize=1000)
updated_y_pred = K.gather(K.flatten(y_pred), flattened_indices)
# Alternative implementation using tensorflow, which could be used if
......
......@@ -20,7 +20,7 @@ def test_multi_output():
loss="custom:mse_with_inequalities_and_multiple_outputs",
activation="tanh",
layer_sizes=[16],
max_epochs=500,
max_epochs=50,
minibatch_size=250,
random_negative_rate=0.0,
random_negative_constant=0.0,
......
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