tf.estimator.add_metrics ends in Shapes (None, 12) and (None,) are incompatible
问题 I am using a DNNClassifier as my estimator and wanted to add some additional metrics to the estimator. the code I am using is basically the one from the tf.estimator.add_metrics documentation (https://www.tensorflow.org/api_docs/python/tf/estimator/add_metrics). def my_auc(labels, predictions): auc_metric = tf.keras.metrics.AUC(name="my_auc") auc_metric.update_state(y_true=labels, y_pred=predictions['logits']) return {'auc': auc_metric} hidden_layers = len(training_data.__call__().element