回答編集履歴

1

一部間違いがあったため修正

2022/07/17 07:29

投稿

East_san
East_san

スコア407

test CHANGED
@@ -2,7 +2,7 @@
2
2
  def accuracy(y_true, y_pred):
3
3
  pred_error = y_true - y_pred
4
4
  result = tf.divide(
5
- tf.reduce_sum(tf.cast(pred_error < 0.1, tf.float32)) + tf.reduce_sum(tf.cast(pred_error < 0.1, tf.float32))*0.5,
5
+ tf.reduce_sum(tf.cast(pred_error < 0.1, tf.float32)) + tf.reduce_sum(tf.cast(pred_error < 0.2, tf.float32))*0.5,
6
6
  len(y_pred)
7
7
  )
8
8
  return result