Open MrYaoH opened 3 years ago
Sorry, I am not super familiar with the pytorch implementation, but I think even if for the first batch, the k-means is not done, it can just use the initial value of the C_i or previous saved values to do the computations, this would just make the first batch not used super well, which should be totally fine.
Sorry, I am not super familiar with the pytorch implementation, but I think even if for the first batch, the k-means is not done, it can just use the initial value of the C_i or previous saved values to do the computations, this would just make the first batch not used super well, which should be totally fine.
Thank you for your reply. I sincerely appreciate your work.
In the ‘train_one_epoch‘ function,I notice that when 'loss.backward()' is carried out for the first time,the Ci is not clustered by k-means method. Clustering does not work until the second data batch in the first epoch enters. This problem make me confused. In other words,why 'loss.backward()' function is defined before the k-means function? In the paper, the k-means function should do before computing the loss. right?