Closed happyboyneu closed 3 years ago
thanks!you are right!I have found that the classes i get from this code only have one kind recently,But I never figured out what the problem was. now i think the problem is just as you said。But I haven't found the right function yet, Do you have a solution?
看你的readme应该是中国人吧,直接中文回复了,libtorch里面没找到torch.unique()对应的实现,所以在遍历类别的时候,我直接使用了num_class。 有个限制就是要求类别id是从0开始连续的
哎都是中国人早说嘛哈哈,终于找到之前的问题所在了,你这个思路确实可以,感谢提醒!
in utils.cpp,this line will lead an error. because at::unique_consecutive is "Eliminates all but the first element from every consecutive group of equivalent elements.". Not same with torch.unique().