NVlabs / DeepInversion

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

multi-gpu support #22

Open alexandrosstergiou opened 1 year ago

alexandrosstergiou commented 1 year 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.