lyakaap / VAT-pytorch

Virtual Adversarial Training (VAT) implementation for PyTorch
296 stars 43 forks source link

Misplaced parameter in README example #4

Closed taoroalin closed 5 years ago

taoroalin commented 6 years ago

In the example in the README, the the model is passed to VATLoss.init, but it should be passed to VATLoss.forward() like,

VATLoss(model, xi=10.0, eps=1.0, ip=1) vat_loss(data)

but it should be

VATLoss(xi=10.0, eps=1.0, ip=1) vat_loss(model, data)

thanks

lyakaap commented 5 years ago

Fixed. Thanks for pointing that.