VGG迁移学习错误
VGG transfer learning error
我正在使用迁移学习方法训练 VGG 网络。 (微调)但是在训练数据集时,我发现在停止训练过程的地方出现以下错误。
ETA: 19:00:06
4407296/553467096 [..............................] - ETA: 19:06:49
4415488/553467096 [..............................] - ETA: 19:10:23Traceback (most recent call last):
File "C:\CT_SCAN_IMAGE_SET\vgg\vggTransferLearning.py", line 161, in <module>
model = vgg16_model(img_rows, img_cols, channel, num_classes)
File "C:\CT_SCAN_IMAGE_SET\vgg\vggTransferLearning.py", line 120, in vgg16_model
model = VGG16(weights='imagenet', include_top=True)
File "C:\Research\Python_installation\lib\site-packages\keras\applications\vgg16.py", line 169, in VGG16
file_hash='64373286793e3c8b2b4e3219cbf3544b')
File "C:\Research\Python_installation\lib\site-packages\keras\utils\data_utils.py", line 221, in get_file
urlretrieve(origin, fpath, dl_progress)
File "C:\Research\Python_installation\lib\urllib\request.py", line 217, in urlretrieve
block = fp.read(bs)
File "C:\Research\Python_installation\lib\http\client.py", line 448, in read
n = self.readinto(b)
File "C:\Research\Python_installation\lib\http\client.py", line 488, in readinto
n = self.fp.readinto(b)
File "C:\Research\Python_installation\lib\socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "C:\Research\Python_installation\lib\ssl.py", line 929, in recv_into
return self.read(nbytes, buffer)
File "C:\Research\Python_installation\lib\ssl.py", line 791, in read
return self._sslobj.read(len, buffer)
File "C:\Research\Python_installation\lib\ssl.py", line 575, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
谁能帮我找出这里的问题。
当它试图下载vgg16的权重时,由于连接中断而显示错误。尝试手动下载权重。 (link: https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5)
下载权重后,将其放入 keras 文件夹中名为 'models' 的文件夹中。
keras文件夹默认隐藏。
文件夹路径:C:\Users\UserName.keras\models.
完成此设置后,尝试 运行 代码。
我正在使用迁移学习方法训练 VGG 网络。 (微调)但是在训练数据集时,我发现在停止训练过程的地方出现以下错误。
ETA: 19:00:06
4407296/553467096 [..............................] - ETA: 19:06:49
4415488/553467096 [..............................] - ETA: 19:10:23Traceback (most recent call last):
File "C:\CT_SCAN_IMAGE_SET\vgg\vggTransferLearning.py", line 161, in <module>
model = vgg16_model(img_rows, img_cols, channel, num_classes)
File "C:\CT_SCAN_IMAGE_SET\vgg\vggTransferLearning.py", line 120, in vgg16_model
model = VGG16(weights='imagenet', include_top=True)
File "C:\Research\Python_installation\lib\site-packages\keras\applications\vgg16.py", line 169, in VGG16
file_hash='64373286793e3c8b2b4e3219cbf3544b')
File "C:\Research\Python_installation\lib\site-packages\keras\utils\data_utils.py", line 221, in get_file
urlretrieve(origin, fpath, dl_progress)
File "C:\Research\Python_installation\lib\urllib\request.py", line 217, in urlretrieve
block = fp.read(bs)
File "C:\Research\Python_installation\lib\http\client.py", line 448, in read
n = self.readinto(b)
File "C:\Research\Python_installation\lib\http\client.py", line 488, in readinto
n = self.fp.readinto(b)
File "C:\Research\Python_installation\lib\socket.py", line 575, in readinto
return self._sock.recv_into(b)
File "C:\Research\Python_installation\lib\ssl.py", line 929, in recv_into
return self.read(nbytes, buffer)
File "C:\Research\Python_installation\lib\ssl.py", line 791, in read
return self._sslobj.read(len, buffer)
File "C:\Research\Python_installation\lib\ssl.py", line 575, in read
v = self._sslobj.read(len, buffer)
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host
谁能帮我找出这里的问题。
当它试图下载vgg16的权重时,由于连接中断而显示错误。尝试手动下载权重。 (link: https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5)
下载权重后,将其放入 keras 文件夹中名为 'models' 的文件夹中。 keras文件夹默认隐藏。
文件夹路径:C:\Users\UserName.keras\models.
完成此设置后,尝试 运行 代码。