zhanghang1989 / PyTorch-Multi-Style-Transfer

Neural Style and MSG-Net
http://hangzh.com/PyTorch-Style-Transfer/
MIT License
976 stars 207 forks source link

Sha or md5 hash for pretrained model #20

Open jvmncs opened 6 years ago

jvmncs commented 6 years ago

According to BadNets, pretrained models can be poisoned. One way to partially mitigate this is to provide a hash for the downloaded files. It's also just good security practice, especially considering that PyTorch serializes models with Pickle by default, which can execute arbitrary code. Just hoping to make the ML community a bit more secure :)