diff --git "a/stackoverflow_DL-related_questions_data/data22.json" "b/stackoverflow_DL-related_questions_data/data22.json" new file mode 100644--- /dev/null +++ "b/stackoverflow_DL-related_questions_data/data22.json" @@ -0,0 +1,3000 @@ +{"QuestionId":57473527,"AnswerCount":1,"Tags":"","CreationDate":"2019-08-13T08:02:41.707","AcceptedAnswerId":57474276.0,"OwnerUserId":10232932.0,"Title":"Text classification with IMDB dataset get_word_index error, how to change the path","Body":"

As I am behind a proxy, I cannot access the IMDB dataset directly, so I saved the complete package in:<\/p>\n\n

C:\\Users\\...\\.keras\\datasets\\imdb.npz\n<\/code><\/pre>\n\n

I can successfully load the following command:<\/p>\n\n

# save np.load\nnp_load_old = np.load\n# modify the default parameters of np.load\nnp.load = lambda *a,**k: np_load_old(*a, allow_pickle=True, **k)\nimdb = keras.datasets.imdb\n(train_data, train_labels), (test_data, test_labels) = imdb.load_data(num_words=10000)\n# restore np.load for future normal usage\nnp.load = np_load_old\n<\/code><\/pre>\n\n

Where I have the train and test data.<\/p>\n\n

When I want to proceed with basic text classification<\/a>, I have to get the word index:<\/p>\n\n

word_index = imdb.get_word_index()\n<\/code><\/pre>\n\n

I (again) get the error: <\/p>\n\n

Exception: URL fetch failure on https:\/\/storage.googleapis.com\/tensorflow\/tf-keras-datasets\/imdb_word_index.json: None -- [Errno 11004] getaddrinfo failed\n<\/code><\/pre>\n\n

How can I avoid this?<\/p>\n\n

I understand that I can adjust the path:<\/p>\n\n

word_index = imdb.get_word_index(path='imdb_word_index.json')\n<\/code><\/pre>\n\n

But what is the right path in my case?<\/p>\n","answers":[{"AnswerId":"57474276","CreationDate":"2019-08-13T08:53:45.037","ParentId":null,"OwnerUserId":"349130","Title":null,"Body":"

Again, same drill, download the file at https:\/\/storage.googleapis.com\/tensorflow\/tf-keras-datasets\/imdb_word_index.json<\/a> and put it inside C:\\Users\\<your_username>\\.keras\\datasets<\/code> and then use get_word_index<\/code> as normal.<\/p>\n"}]} +{"QuestionId":57474105,"AnswerCount":0,"Tags":"","CreationDate":"2019-08-13T08:42:50.963","AcceptedAnswerId":null,"OwnerUserId":10666066.0,"Title":"api_def.pb.h not found when building tensorflow","Body":"

I'm currently trying to build c++ tensorflow example<\/a> on windows and then i get the following error:<\/p>\n\n

\n

fatal error: tensorflow\/core\/framework\/api_def.pb.h: No such file or directory<\/p>\n<\/blockquote>\n\n

I checked and see that api_def.pb.h<\/code> is missing in the directory. It's strange that I downloaded whole source code from here<\/a>, which I think there should be nothing wrong with it since it's the official site. But then I realized that not only this file but all the requiring .pb.h<\/code> files are missing. Such as op_def.pb.h<\/code>, function.pb.h<\/code>, node_def.pb.h<\/code>, ...<\/p>\n\n

Though I can manually search on google, download and add other files to the appropriate directory, but in this case, all the result for api_def.pb.h<\/code> file is about including it, none is about the content of raw file.<\/p>\n\n

My questions are:<\/p>\n\n