xinntao / EDVR

Winning Solution in NTIRE19 Challenges on Video Restoration and Enhancement (CVPR19 Workshops) - Video Restoration with Enhanced Deformable Convolutional Networks. EDVR has been merged into BasicSR and this repo is a mirror of BasicSR.
https://github.com/xinntao/BasicSR
1.49k stars 318 forks source link

Update base_model.py #29

Closed Mukosame closed 4 years ago

Mukosame commented 5 years ago

change the save_network to make it compatible for unknown failure cases.(I run the original code on 2 machines, one passed and the other failed. The new code can pass on both machines)

xinntao commented 5 years ago

Actually, I think the load_network function has dealt with the situation where the name starts with model.. I am wondering why you still meet this problem. Could you give more details?

Mukosame commented 5 years ago

Hi I tried load_network(), and then put the loaded network to save_model, it still reports the error of "unwanted keys". So I add some print() and discover following things:

And this only happen on one machine, on the other one, even if I don't call load_newtork(), this function will still run smoothly without any problems. All the codes and models mentioned above are the same, and environment is built based on requirements.

I also tried other solutions to s/l the model but didn't help. After half an hour I was really pissed off by this Heisenbug and decide to add this if. It finally works T^T

xinntao commented 5 years ago

@Mukosame , Thanks, I will test and then merge it later.