Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reshaping not implemented for csr_matrix. #6

Open
zhishui3 opened this issue Dec 1, 2019 · 0 comments
Open

Reshaping not implemented for csr_matrix. #6

zhishui3 opened this issue Dec 1, 2019 · 0 comments

Comments

@zhishui3
Copy link

zhishui3 commented Dec 1, 2019

Multilingual Embeddings - 2. Cross-lingual Sentence Similarity.ipynb
questions["tfidf_en_sim"] = [cosine_similarity(q1.reshape(1, -1), q2.reshape(1, -2))[0,0] for q1, q2 in zip(questions1_all_en_tfidf_en, questions2_all_en_tfidf_en)]
22
23 questions["tfidf_enfr_sim"] = [cosine_similarity(q1.reshape(1, -1), q2.reshape(1, -2))[0,0]

~\AppData\Roaming\Python\Python36\site-packages\scipy\sparse\base.py in reshape(self, shape, order)
127 """
128 raise NotImplementedError("Reshaping not implemented for %s." %
--> 129 self.class.name)
130
131 def astype(self, dtype, casting='unsafe', copy=True):

NotImplementedError: Reshaping not implemented for csr_matrix.

您好!请问这是什么原因呀?

第二个问题是
data/multilingual_embeddings/questions.csv 文件中的 is_duplicate列是什么意思呀?

question1_en question2_en 都是不一样的啊 不管is_duplicate是不是等于1
期待您的回复!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant