# Visualizers Calculation Process

<figure><img src="https://3509361326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F9UXeOlFqlw8pl79U2HGU%2Fuploads%2FedpcM4yRpD4x3aQdhw91%2Fimage.png?alt=media&#x26;token=70126232-8c4d-49a7-a931-78d6fa7bc72b" alt=""><figcaption><p>Filtering for Visualizer calculation processes in the platform</p></figcaption></figure>

### Overview

Visualizers calculation process is triggered in one of two ways:

* Automatically, once the population exploration that follows an evaluate process is completed
* Manually, upon trigger from the [dashboard](https://docs.tensorleap.ai/user-interface/project/dashboards).

This process:

* Collects all of the currently selected samples for visualization.
* Runs all [visualizers connected via the mapping](https://docs.tensorleap.ai/user-interface/project/network/network-mapping)  using their [registered functions](https://docs.tensorleap.ai/tensorleap-integration/writing-integration-code/visualizer-function) in the **currently** connected [code intgeration](https://docs.tensorleap.ai/user-interface/project/network/code-integration) version.
* Computes the spatial distribution of latent space activations per input for population exploration heatmaps.

### Common Run Issues:

{% hint style="danger" %}
Visualizers calculation mostly fail due to these reasons:

* A recent [unvalidated change](https://docs.tensorleap.ai/user-interface/project/network/network-mapping/validate-mapping) was made to the connected integration script. Please Validate assets.
* A valid response, but non-intended visualization was returned (i.e. wrong normalization, colors, etc.). Please make sure to use an [integration test](https://docs.tensorleap.ai/tensorleap-integration/integration-test) to verify visualization works as expected on your local environment
* OOM in visualization, please adjust the limits in the [settings](https://docs.tensorleap.ai/user-interface/settings) page.

Visualizer heatmaps seems invalid or missing:

* Invalid heatmaps: make sure [add\_prediction](https://docs.tensorleap.ai/tensorleap-integration/python-api/code_loader/leap_binder/add_prediction) and [input\_encoder](https://docs.tensorleap.ai/tensorleap-integration/python-api/code_loader/decorators/tensorleap_input_encoder) both declare the correct channel dimension.
* Missing heatmaps: make sure the [visualizer function](https://docs.tensorleap.ai/tensorleap-integration/writing-integration-code/visualizer-function) does not reshape its input (i.e. input and output spatial dimensions are the same). If it does, you might need to supply a custom heatmap function that reshapes the [heatmap](https://docs.tensorleap.ai/tensorleap-integration/python-api/code_loader/decorators/tensorleap_custom_visualizer#resize-image-and-heatmap) in the same way.
  {% endhint %}
