tensorflow / tensorflow/tensorboard

Feature Request: Masking in Histogram summaries

Open
#4,505 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core:summaries plugin:histogram theme:usability type:feature
Dominant language
TypeScript
Stars
7.2k
Forks
1.7k
Avg merge
4d 22h
Merged PRs (30d)
1

Description

(Possibly related to https://github.com/tensorflow/tensorboard/issues/2885)

I have a tensor and a binary mask indicating which entries in the tensor I care about. I'd like to write a histogram summary of these values.

The trivial solution right now is to multiply the tensor by the mask and feed that to tf.summary.histogram, but this results in a lot of zeros that mess up the visualization. On TPUs I can't do a tf.gather to get rid of the zeros, since then I end up with a dynamic tensor shape.

Instead, it would be nice to be able to pass the mask directly to tf.summary.histogram to tell it to ignore the zero values when computing the histogram.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names no implementation files, tests, or entry points. Start by tracing the tf.summary.histogram API and its histogram-summary implementation, then determine how a mask could be represented without dynamic tensor shapes; done means masked values are excluded from the visualization, including on TPUs, with focused tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
tensorflow
Domain
api, data-visualization
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.