I copy-pasted the provided code in Course 1 Assignment 3, section 1.1 " To Run This Code On Your Own Machine" part into my local IDE. I also downloaded and unzipped the said ‘GoogleNews-vectors-negative300.bin’ file.
However, even just running the following 2-liner produced a ValueError: ‘could not broadcast input array from shape (180) into shape (300)’.
Is there any work around? I would expect provided code to work without this kind of issue, just want to know if I’ve missed something. Thanks.
Copy-paste the code below and run it on your local machine after downloading the dataset to the same directory as the notebook.
import nltk from gensim.models import KeyedVectors
embeddings = KeyedVectors.load_word2vec_format('./GoogleNews-vectors-negative300.bin', binary = True)