Louis-udm / VGCN-BERT

MIT License
121 stars 35 forks source link

prepare_data #13

Closed xdo00 closed 3 years ago

xdo00 commented 3 years ago

run prepare_data.py for i in range(vocab_size): norm=np.linalg.norm(vocab_tfidf.data[i]) if norm>0: vocab_tfidf.data[i]/=norm

vocab_adj_tf=vocab_tfidf.dot(vocab_tfidf.T)

TypeError: Expected list, got numpy.ndarray

请问是哪里的问题呢

pervaizniazi commented 3 years ago

Hi, How did you solve it? I am getting the same problem.

goonmeet commented 3 years ago

You can try:

vocab_adj_tf=vocab_tfidf.dot(np.array(vocab_tfidf).T)

pervaizniazi commented 3 years ago

I downgrade scipy that fixed the issue.

nathanchen0618 commented 3 years ago

I downgrade scipy that fixed the issue.

This works. I downgrade scipy version from 1.6 to 1.2.