fashion_mnist.load_data() fails do to force connection closed by remote
up vote
0
down vote
favorite
I'm trying to go through the tensorflow tutorial which requires me to execture the line
fashion_mnist.load_data()
in my code to download the data set. In the middle of the download I get the following error.
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
How can I prevent the host from closing the connection.
File Being Executed
import _thread
import time
import chess
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
fashion_mnist = keras.datasets.fashion_mnist
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
train_images.shape
Output I Get
1.12.0
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz
8192/5148 [===============================================] - 0s 0us/step
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz
8192/4422102 [..............................] - ETA: 4s
57344/4422102 [..............................] - ETA: 5s
147456/4422102 [>.............................] - ETA: 3s
278528/4422102 [>.............................] - ETA: 2s
376832/4422102 [=>............................] - ETA: 2s
385024/4422102 [=>............................] - ETA: 3s
393216/4422102 [=>..........
... [more lines] ...
====>........................] - ETA: 42:25
5758976/26421880 [=====>........................] - ETA: 42:32
5767168/26421880 [=====>........................] - ETA: 42:39
5775360/26421880 [=====>........................] - ETA: 42:46
5783552/26421880 [=====>........................] - ETA: 42:54
5791744/26421880 [=====>........................] - ETA: 43:09
5799936/26421880 [=====>........................] - ETA: 43:18
5808128/26421880 [=====>........................] - ETA: 43:26
5816320/26421880 [=====>........................] - ETA: 43:34Traceback (most recent call last):
File "D:PiChessCorehello - Copy.py", line 20, in <module>
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasdatasetsfashion_mnist.py", line 52, in load_data
paths.append(get_file(fname, origin=base + fname, cache_subdir=dirname))
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasutilsdata_utils.py", line 249, in get_file
urlretrieve(origin, fpath, dl_progress)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64liburllibrequest.py", line 277, in urlretrieve
block = fp.read(bs)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 449, in read
n = self.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsocket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
python tensorflow keras
add a comment |
up vote
0
down vote
favorite
I'm trying to go through the tensorflow tutorial which requires me to execture the line
fashion_mnist.load_data()
in my code to download the data set. In the middle of the download I get the following error.
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
How can I prevent the host from closing the connection.
File Being Executed
import _thread
import time
import chess
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
fashion_mnist = keras.datasets.fashion_mnist
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
train_images.shape
Output I Get
1.12.0
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz
8192/5148 [===============================================] - 0s 0us/step
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz
8192/4422102 [..............................] - ETA: 4s
57344/4422102 [..............................] - ETA: 5s
147456/4422102 [>.............................] - ETA: 3s
278528/4422102 [>.............................] - ETA: 2s
376832/4422102 [=>............................] - ETA: 2s
385024/4422102 [=>............................] - ETA: 3s
393216/4422102 [=>..........
... [more lines] ...
====>........................] - ETA: 42:25
5758976/26421880 [=====>........................] - ETA: 42:32
5767168/26421880 [=====>........................] - ETA: 42:39
5775360/26421880 [=====>........................] - ETA: 42:46
5783552/26421880 [=====>........................] - ETA: 42:54
5791744/26421880 [=====>........................] - ETA: 43:09
5799936/26421880 [=====>........................] - ETA: 43:18
5808128/26421880 [=====>........................] - ETA: 43:26
5816320/26421880 [=====>........................] - ETA: 43:34Traceback (most recent call last):
File "D:PiChessCorehello - Copy.py", line 20, in <module>
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasdatasetsfashion_mnist.py", line 52, in load_data
paths.append(get_file(fname, origin=base + fname, cache_subdir=dirname))
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasutilsdata_utils.py", line 249, in get_file
urlretrieve(origin, fpath, dl_progress)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64liburllibrequest.py", line 277, in urlretrieve
block = fp.read(bs)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 449, in read
n = self.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsocket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
python tensorflow keras
1
Did you try downloading the dataset multiple times?
– Matias Valdenegro
Nov 11 at 9:18
Yes. This error has happened on every attempt of every type of data set.
– Tolure
Nov 11 at 20:18
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to go through the tensorflow tutorial which requires me to execture the line
fashion_mnist.load_data()
in my code to download the data set. In the middle of the download I get the following error.
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
How can I prevent the host from closing the connection.
File Being Executed
import _thread
import time
import chess
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
fashion_mnist = keras.datasets.fashion_mnist
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
train_images.shape
Output I Get
1.12.0
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz
8192/5148 [===============================================] - 0s 0us/step
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz
8192/4422102 [..............................] - ETA: 4s
57344/4422102 [..............................] - ETA: 5s
147456/4422102 [>.............................] - ETA: 3s
278528/4422102 [>.............................] - ETA: 2s
376832/4422102 [=>............................] - ETA: 2s
385024/4422102 [=>............................] - ETA: 3s
393216/4422102 [=>..........
... [more lines] ...
====>........................] - ETA: 42:25
5758976/26421880 [=====>........................] - ETA: 42:32
5767168/26421880 [=====>........................] - ETA: 42:39
5775360/26421880 [=====>........................] - ETA: 42:46
5783552/26421880 [=====>........................] - ETA: 42:54
5791744/26421880 [=====>........................] - ETA: 43:09
5799936/26421880 [=====>........................] - ETA: 43:18
5808128/26421880 [=====>........................] - ETA: 43:26
5816320/26421880 [=====>........................] - ETA: 43:34Traceback (most recent call last):
File "D:PiChessCorehello - Copy.py", line 20, in <module>
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasdatasetsfashion_mnist.py", line 52, in load_data
paths.append(get_file(fname, origin=base + fname, cache_subdir=dirname))
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasutilsdata_utils.py", line 249, in get_file
urlretrieve(origin, fpath, dl_progress)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64liburllibrequest.py", line 277, in urlretrieve
block = fp.read(bs)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 449, in read
n = self.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsocket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
python tensorflow keras
I'm trying to go through the tensorflow tutorial which requires me to execture the line
fashion_mnist.load_data()
in my code to download the data set. In the middle of the download I get the following error.
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
How can I prevent the host from closing the connection.
File Being Executed
import _thread
import time
import chess
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
# Helper libraries
import numpy as np
import matplotlib.pyplot as plt
print(tf.__version__)
fashion_mnist = keras.datasets.fashion_mnist
class_names = ['T-shirt/top', 'Trouser', 'Pullover', 'Dress', 'Coat',
'Sandal', 'Shirt', 'Sneaker', 'Bag', 'Ankle boot']
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
train_images.shape
Output I Get
1.12.0
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-labels-idx1-ubyte.gz
8192/5148 [===============================================] - 0s 0us/step
Downloading data from https://storage.googleapis.com/tensorflow/tf-keras-datasets/t10k-images-idx3-ubyte.gz
8192/4422102 [..............................] - ETA: 4s
57344/4422102 [..............................] - ETA: 5s
147456/4422102 [>.............................] - ETA: 3s
278528/4422102 [>.............................] - ETA: 2s
376832/4422102 [=>............................] - ETA: 2s
385024/4422102 [=>............................] - ETA: 3s
393216/4422102 [=>..........
... [more lines] ...
====>........................] - ETA: 42:25
5758976/26421880 [=====>........................] - ETA: 42:32
5767168/26421880 [=====>........................] - ETA: 42:39
5775360/26421880 [=====>........................] - ETA: 42:46
5783552/26421880 [=====>........................] - ETA: 42:54
5791744/26421880 [=====>........................] - ETA: 43:09
5799936/26421880 [=====>........................] - ETA: 43:18
5808128/26421880 [=====>........................] - ETA: 43:26
5816320/26421880 [=====>........................] - ETA: 43:34Traceback (most recent call last):
File "D:PiChessCorehello - Copy.py", line 20, in <module>
(train_images, train_labels), (test_images, test_labels) = fashion_mnist.load_data()
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasdatasetsfashion_mnist.py", line 52, in load_data
paths.append(get_file(fname, origin=base + fname, cache_subdir=dirname))
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsite-packagestensorflowpythonkerasutilsdata_utils.py", line 249, in get_file
urlretrieve(origin, fpath, dl_progress)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64liburllibrequest.py", line 277, in urlretrieve
block = fp.read(bs)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 449, in read
n = self.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libhttpclient.py", line 493, in readinto
n = self.fp.readinto(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libsocket.py", line 586, in readinto
return self._sock.recv_into(b)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 1009, in recv_into
return self.read(nbytes, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 871, in read
return self._sslobj.read(len, buffer)
File "C:Program Files (x86)Microsoft Visual StudioSharedPython36_64libssl.py", line 631, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
python tensorflow keras
python tensorflow keras
asked Nov 11 at 7:16
Tolure
3991921
3991921
1
Did you try downloading the dataset multiple times?
– Matias Valdenegro
Nov 11 at 9:18
Yes. This error has happened on every attempt of every type of data set.
– Tolure
Nov 11 at 20:18
add a comment |
1
Did you try downloading the dataset multiple times?
– Matias Valdenegro
Nov 11 at 9:18
Yes. This error has happened on every attempt of every type of data set.
– Tolure
Nov 11 at 20:18
1
1
Did you try downloading the dataset multiple times?
– Matias Valdenegro
Nov 11 at 9:18
Did you try downloading the dataset multiple times?
– Matias Valdenegro
Nov 11 at 9:18
Yes. This error has happened on every attempt of every type of data set.
– Tolure
Nov 11 at 20:18
Yes. This error has happened on every attempt of every type of data set.
– Tolure
Nov 11 at 20:18
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53246624%2ffashion-mnist-load-data-fails-do-to-force-connection-closed-by-remote%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
Did you try downloading the dataset multiple times?
– Matias Valdenegro
Nov 11 at 9:18
Yes. This error has happened on every attempt of every type of data set.
– Tolure
Nov 11 at 20:18