Open KimRasak opened 4 years ago
def create_adj_mat(self): t1 = time() adj_mat = sp.dok_matrix((self.n_users + self.n_items, self.n_users + self.n_items), dtype=np.float32) adj_mat = adj_mat.tolil() R = self.R.tolil() adj_mat[:self.n_users, self.n_users:] = R adj_mat[self.n_users:, :self.n_users] = R.T adj_mat = adj_mat.todok() print('already create adjacency matrix', adj_mat.shape, time() - t1) t2 = time()
I've waited for a day and the code is still stuck at adj_mat = adj_mat.todok()
adj_mat = adj_mat.todok()
I've waited for a day and the code is still stuck at
adj_mat = adj_mat.todok()