How to create heatmap by given coordinates in pytorch

Check this discussion out: How to create heatmap by given coordinates in mat file in pytorch