While coding the Yolo version1 Loss function, I got this error, in this line of code:
box_predictions[..., 2:4] = tf.Variable((tf.math.sign(box_predictions[..., 2:4])) * (tf.math.abs(box_predictions[..., 2:4])))
Even with these lines of code, it displays the same error:
box11 = tf.math.sign(box_predictions[..., 2:4])
box12 = tf.math.abs(box_predictions[..., 2:4])
box_predictions[..., 2:4] = box11 * box12
box_predictions[..., 2:4] = tf.Variable((tf.math.sign(box_predictions[..., 2:4])) * (tf.math.abs(box_predictions[..., 2:4])))