【问题标题】:VGG transfer learning errorVGG迁移学习错误
【发布时间】:2018-08-04 04:05:02
【问题描述】:

我正在使用迁移学习方法训练 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

谁能帮我找出这里的问题。

【问题讨论】:

    标签: neural-network deep-learning conv-neural-network vgg-net


    【解决方案1】:

    当它尝试下载vgg16的权重时,由于连接中断而显示错误。尝试手动下载权重。 (链接:https://github.com/fchollet/deep-learning-models/releases/download/v0.1/vgg16_weights_tf_dim_ordering_tf_kernels_notop.h5

    下载权重后,将其放入 keras 文件夹中名为“models”的文件夹中。 keras 文件夹默认是隐藏的。

    PathToFolder:C:\Users\UserName.keras\models。

    设置完成后,尝试运行代码。

    【讨论】:

      猜你喜欢
      • 2019-03-31
      • 1970-01-01
      • 1970-01-01
      • 2017-09-14
      • 2020-05-13
      • 2018-10-04
      • 1970-01-01
      • 1970-01-01
      • 2020-10-31
      相关资源
      最近更新 更多