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: