We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I believe submitting both the stats tensors and op to tf.summary.tensor_summary creates duplicate plots
def compute_summary(tp, fp, tn, fn, collections): precision = tp / tf.maximum(_MINIMUM_COUNT, tp + fp) recall = tp / tf.maximum(_MINIMUM_COUNT, tp + fn) return _create_tensor_summary( name, tp, fp, tn, fn, precision, recall, num_thresholds, display_name, description, collections) pr_curve = compute_summary(tp, fp, tn, fn, metrics_collections) update_op = compute_summary(update_tp, update_fp, update_tn, update_fn, updates_collections) return pr_curve, update_op
I have made a quick fix that looks like this:
def compute_summary(tp, fp, tn, fn, collections): precision = tp / tf.maximum(_MINIMUM_COUNT, tp + fp) recall = tp / tf.maximum(_MINIMUM_COUNT, tp + fn) return tf.stack([ tf.cast(tp, tf.float32), tf.cast(fp, tf.float32), tf.cast(tn, tf.float32), tf.cast(fn, tf.float32), tf.cast(precision, tf.float32), tf.cast(recall, tf.float32) ]) pr_curve = tf.summary.tensor_summary( name='pr_curves', tensor=compute_summary(tp, fp, tn, fn, metrics_collections), collections=metrics_collections, summary_metadata=metadata.create_summary_metadata( display_name=display_name if display_name is not None else name, description=description or '', num_thresholds=num_thresholds ) ) update_op = compute_summary(update_tp, update_fp, update_tn, update_fn, updates_collections) return pr_curve, update_op
This removes the duplicate plot but most of the code are a bad code duplication.
Will appreciate any recommendations for fix without code change or maybe a cleaner fix to be committed for pr curves
The text was updated successfully, but these errors were encountered:
chihuahua
No branches or pull requests
I believe submitting both the stats tensors and op to tf.summary.tensor_summary creates duplicate plots

I have made a quick fix that looks like this:
This removes the duplicate plot but most of the code are a bad code duplication.
Will appreciate any recommendations for fix without code change or maybe a cleaner fix to be committed for pr curves
The text was updated successfully, but these errors were encountered: