遇到这个问题,但我不知道如何解决?
ValueError Traceback (most recent call last)
Cell In[8], line 2
1 # Generate aggregated sentence vectors based on the word vectors for each word in the sentence
----> 2 w2v_vect = np.array([np.array([w2v_model.wv[i] for i in ls if i in w2v_model.wv.index_to_key])
3 for ls in X_test])
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (1115,) + inhomogeneous part.
我不知道要修改什么以及如何修改。
@gojomo 你是如何解决这个问题的?