RUCAIBox / NCL

[WWW'22] Official PyTorch implementation for "Improving Graph Collaborative Filtering with Neighborhood-enriched Contrastive Learning".
119 stars 20 forks source link

运行yelp数据集出现出错误 #50

Closed njt123123 closed 1 year ago

njt123123 commented 1 year ago

Traceback (most recent call last): File "/tmp/NCL-master/main.py", line 68, in run_single_model(args) File "/tmp/NCL-master/main.py", line 41, in run_single_model best_valid_score, best_valid_result = trainer.fit( File "/tmp/NCL-master/trainer.py", line 44, in fit self.model.e_step() File "/tmp/NCL-master/ncl.py", line 69, in e_step self.user_centroids, self.user_2cluster = self.run_kmeans(user_embeddings) File "/tmp/NCL-master/ncl.py", line 76, in run_kmeans kmeans.train(x) File "/root/miniconda3/lib/python3.10/site-packages/faiss/init.py", line 1560, in train clus.train(x, self.index, weights) File "/root/miniconda3/lib/python3.10/site-packages/faiss/init.py", line 68, in replacement_train self.train_c(n, swig_ptr(x), index) File "/root/miniconda3/lib/python3.10/site-packages/faiss/swigfaiss.py", line 2328, in train return _swigfaiss.Clustering_train(self, n, x, index, x_weights) RuntimeError: Error in void faiss::Clustering::train_encoded(faiss::Clustering::idx_t, const uint8_t, const faiss::Index, faiss::Index&, const float*) at /project/faiss/faiss/Clustering.cpp:283: Error: 'nx >= k' failed: Number of training points (3) should be at least as large as number of clusters (2000)