akankshakshurai/cuda-error-resolution-analysis huggingface dataset:
UnpicklingError: invalid load key, '\x00'

Amin_Asghari: <p>Hi, I did it but it didn’t work:</p>
<p>def load_model(weights):</p>
<pre><code>model = TinyYoloNet()
model.load_state_dict(torch.load(weights))
return model
</code></pre>
<p>model = load_model(weights=“F:\VIDEOS\PHYTON\My tests\test PYTORCH\yolo-week4\tiny-yolo-voc-weights.pth”)</p>
<h1>print(model)</h1>
<p>but  the error is:</p>
<p>File “”, line 4, in load_model<br>
model.load_state_dict(torch.load(weights))</p>
<p>File “C:\Users\AMIN\Anaconda3\lib\site-packages\torch\serialization.py”, line 529, in load<br>
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)</p>
<p>File “C:\Users\AMIN\Anaconda3\lib\site-packages\torch\serialization.py”, line 692, in _legacy_load<br>
magic_number = pickle_module.load(f, **pickle_load_args)</p>
<p>UnpicklingError: invalid load key, ‘\x00’.</p>

jitesh: <p>Hi, even I am facing the same issue. Did you figure this out yet?</p>

Amin_Asghari: <p>Unfortunately not yet. but It seems that we should changes yolo darknet weights to pytorch weights</p>

yaoxingtian: <p>hi, did you solve this problem now ? I find the same problem and do not know how to figure it out .</p>

HarryB25: <p>Hi, Did you solve the problem? I had the same problem you had when I was loading the yolo weight to my model. I saw someone say it was because of macOS hidden folders. Not sure what operating system you’re using</p>