TensorFlow TypeError: unsupported operand type(s) for /: 'tuple' and 'int' - How to Calculate c_true + k_true
To calculate the sum of c_true and k_true, you need to access the actual values from the tuples and then perform the addition. Here's the corrected code:
c_true = dataset2['c'], tf.float32
k_true = dataset2['k'], tf.float32
c_true_value = c_true[0]
k_true_value = k_true[0]
p = (c_true_value + k_true_value) / 2
原文地址: https://www.cveoy.top/t/topic/lBNz 著作权归作者所有。请勿转载和采集!