DeepLearningExamples icon indicating copy to clipboard operation
DeepLearningExamples copied to clipboard

[SSD/Pytorch] RuntimeError: unexpected EOF, expected 74898 more bytes. The file might be corrupted.

Open WangXin93 opened this issue 3 years ago • 1 comments

Related to [SSD/Pytorch]

Describe the bug I met RuntimeError: expected 74898 more bytes. The file might be corrupted. when I load the ssd pytorch model. It seems the model file is corrupted but I do not know where to download the right file.

Steps to reproduce the behavior:

import torch
m = torch.hub.load('NVIDIA/DeepLearningExamples:torchhub', 'nvidia_ssd', model_math='fp32')

I also download the model manually from https://catalog.ngc.nvidia.com/orgs/nvidia/models/ssd_pyt_ckpt_amp, then use torch.load(ckpt_file) to load the model, but get the same error.

I want to know how to load SSD pytorch model correctly.

Environment

  • Container version: pytorch 1.9.0+cu111
  • GPUs in the system: Single 3090 24GB
  • CUDA driver version: Build cuda_11.1.TC455_06.29069683_0

WangXin93 avatar Mar 08 '22 08:03 WangXin93

hi, i just met the same issue. and i reload the ckpt by wget https://api.ngc.nvidia.com/v2/models/nvidia/ssd_pyt_ckpt_amp/versions/20.06.0/files/nvidia_ssdpyt_amp_200703.pt. and modify the source codes:

  1. add force_reload=False when initializing the model, and
  2. update the checkpoint value to the local ckpt. image

NeverGiveU avatar Sep 22 '22 06:09 NeverGiveU