NVlabs / DeepInversion

Official PyTorch implementation of Dreaming to Distill: Data-free Knowledge Transfer via DeepInversion (CVPR 2020)
Other
488 stars 79 forks source link

multi-gpu support #22

Open alexandrosstergiou opened 2 years ago

alexandrosstergiou commented 2 years ago

Thank you very much for providing the code implementation!

I have made some adjustments to the DeepInversionFeatureHook and DeepInversionClass in deepinversion.py, to enable multi-gpu support. In this version, the r_feature loss on each device is summed together to compute the total loss -- mean also works but I found that it required some adjustments to the lr.