Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def normal_loss_1 (y_true, y_pred):
- y_true_flat = K.flatten(y_true)
- y_pred_flat = K.flatten(y_pred)
- #d = y_pred_flat * y_true_flat
- d = np.dot(y_pred_flat,y_true_flat)
- y_sum = K.sum(d)
- n_pixels = 256 * 256
- normal_output = y_sum/n_pixels
- normal_output = tf.reduce_mean(normal_output)
- return -normal_output
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement