How to compute the joint-histogram in pytorch?

any solution?

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