You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/usr/local/lib/python3.6/dist-packages/tf_metrics/init.py in precision(labels, predictions, num_classes, pos_indices, weights, average)
40 """
41 cm, op = _streaming_confusion_matrix(
---> 42 labels, predictions, num_classes, weights)
43 pr, _, _ = metrics_from_confusion_matrix(
44 cm, pos_indices, average=average)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/metrics_impl.py in _streaming_confusion_matrix(labels, predictions, num_classes, weights)
262
263 # Flatten the input if its rank > 1.
--> 264 if predictions.get_shape().ndims > 1:
265 predictions = array_ops.reshape(predictions, [-1])
266
TypeError: '>' not supported between instances of 'NoneType' and 'int'
In python 3, the comparison operators raise an error. Refer to -> https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons
The ordering comparison operators (<, <=, >=, >) raise a TypeError exception when the operands don’t have a meaningful natural ordering. Thus, expressions like 1 < '', 0 > None or len <= len are no longer valid, and e.g. None < None raises TypeError instead of returning False. A corollary is that sorting a heterogeneous list no longer makes sense – all the elements must be comparable to each other. Note that this does not apply to the == and != operators: objects of different incomparable types always compare unequal to each other.
The text was updated successfully, but these errors were encountered:
/usr/local/lib/python3.6/dist-packages/tf_metrics/init.py in precision(labels, predictions, num_classes, pos_indices, weights, average)
40 """
41 cm, op = _streaming_confusion_matrix(
---> 42 labels, predictions, num_classes, weights)
43 pr, _, _ = metrics_from_confusion_matrix(
44 cm, pos_indices, average=average)
/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/metrics_impl.py in _streaming_confusion_matrix(labels, predictions, num_classes, weights)
262
263 # Flatten the input if its rank > 1.
--> 264 if predictions.get_shape().ndims > 1:
265 predictions = array_ops.reshape(predictions, [-1])
266
TypeError: '>' not supported between instances of 'NoneType' and 'int'
In python 3, the comparison operators raise an error. Refer to -> https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons
The ordering comparison operators (<, <=, >=, >) raise a TypeError exception when the operands don’t have a meaningful natural ordering. Thus, expressions like 1 < '', 0 > None or len <= len are no longer valid, and e.g. None < None raises TypeError instead of returning False. A corollary is that sorting a heterogeneous list no longer makes sense – all the elements must be comparable to each other. Note that this does not apply to the == and != operators: objects of different incomparable types always compare unequal to each other.
The text was updated successfully, but these errors were encountered: