URLError: <urlopen error [WinError 10060] The connection attempt failed because the connecting party did not reply properly after a period of time or the connected host did not respond.

It is more appropriate to choose mnist for digit recognition when getting started with TensorFlow. When using the method provided by TensorFlow to import the Mnist dataset, the following error occurs" URLError: <urlopen error [WinError 10060] Because the connecting party did not reply or connect correctly after a period of time The host is not responding and the connection attempt failed . " looks like this:


Solution: This may be due to its own network problems or the unsuccessful connection to the mnist dataset download web page. At this time, we can log in to mnist to download all four dataset compression packages and save them to the corresponding path /path/to/MNIST_data/ , without decompression.


Run the program again, run, successfully print "Training data size: 5500" and "Validating data size: 5000" as shown below:



Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325465910&siteId=291194637