how to compute the joint-histogram between two tensor in pytorch?

i know there is a func: torch.histc() to compute the histogram, but i also want to use the joint-histogram to calculate the mutual information for loss-backward, can anyone implement this code?

Hi jiawei_chen,

Did u find any solution? Any help will be appreciated.

Thank you

any solution?

I have been looking for a np.histogram2D equivalent in pytorch

any solution?

I have been looking for a np.histogram2D equivalent in pytorch