jwyang / JULE.torch

Torch code for our CVPR 2016 paper "Joint Unsupervised LEarning of Deep Representations and Image Clusters"
MIT License
286 stars 82 forks source link

Affinity for clusters #26

Open eleozzr opened 6 years ago

eleozzr commented 6 years ago

https://github.com/jwyang/JULE.torch/blob/d43251d93aba8c00b716c62d6d5d6c34ee29bcb9/agg_clustering_c/agg_clustering.c#L78

In the lines 65-68 (agg_clustering.c file), you first get the length of cluster i and cluster j, which are saved in Y_i_size, Y_jsize, respectively. But I am confused that you use THTensor(get2d)(Y, j, n) - 1 to call the element Y[j,n], in which the maximum of n is Y_j_size, but the column size of Y is Y->size[1].