Visualizer Node
Visualize model graph tensors using Visualizers
Neural networks are made up of components that process generic, undefined data. In order to make sense of the data, Tensorleap enables you to visualize the data contained in any node, using a Visualizer node. You can visualize the input(s), output(s) (prediction), ground truth(s), and intermediate tensors.
These visualization would be present at multiple segments of the Dashboard view.
When performing Sample Analysis, error analysis algorithms analyze the sample's error throughout the model and project it to each input. This will generate various heat-maps highlighting different features. Therefore, at least one connection of the Dataset Node (model-graph input) must be connected to a Visualizer.
You can write your own Custom Visualizers in the Integration Script (see custom visualizers), or use one of the following out-of-the-box Decoders:
HorizontalBar - visualize numeric data as horizontal bar with labels
Image - visualize 2D image
Video - visualize 3D data
Graph - visualize numeric data as a graph
Raw data - presents the raw data as is
Text - tokens representation of text (for token-to-text Visualizer, use the Decoder Function with your tokenizer)
ImageMask - visualize an image and an overlay mask (commonly used in image segmentation)
TextMask - visualize text and an overlay mask (commonly used in text segmentation)
It is highly recommended to use your own custom visualizers in the integration script. This would allow you to test results in your local development environment before you upload the model to Tensorleap. This helps to ensure the visualized results are as you would have expected, and to quickly adjust any normalizations, conversion, and display settings.
Custom Visualizer Example
Adding the following custom visualizer in the script:
@tensorleap_custom_visualizer('image_visualizer', LeapDataType.Image)
def image_visualizer(image: np.ndarray) -> LeapImage:
image = rescale_min_max(image.squeeze(0))
return LeapImage(image.transpose(1,2,0))
Would add the following option in the visualizer selection dropdown menu:

To add a visualizer, select visualizer when adding nodes to the mapping. This visualizer would have the same arguments as your custom visualizer defined in your integration script in the case of a custom visualizer.
Setup

The Visualizer node have several properties:
Selected Visualizer: a dropdown from which a custom or default visualizer can be selected. The list would include all registered custom visualizers from your integration script.
Name: The name of the selected visualizer.
Type: They type of the selected visualizer.
Labels: The expected arguments for your visualizer.
Last updated
Was this helpful?