ZiangYan / deepdefense.pytorch

Implementation of our NeurIPS 2018 paper: Deep Defense: Training DNNs with Improved Adversarial Robustness
39 stars 7 forks source link

logging and replace all .cuda() with to(device) for cpu/gpu switch #1

Closed sndnyang closed 5 years ago

sndnyang commented 5 years ago

logging module instead of glog, adding tensorboardX to(device), args.cuda = not args.no_cuda and torch.cuda.is_available() device = torch.device("cuda" if args.cuda else "cpu")