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









share|improve this question


















  • 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















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









share|improve this question


















  • 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













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









share|improve this question













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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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














  • 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

















active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















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






























active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Guess what letter conforming each word

Port of Spain

Run scheduled task as local user group (not BUILTIN)