nsl.configs.VirtualAdvConfig

Contains configuration for virtual adversarial training.

adv_neighbor_config an nsl.configs.AdvNeighborConfig object for generating virtual adversarial examples. Defaults to nsl.configs.AdvNeighborConfig().
distance_config a nsl.configs.DistanceConfig object for calculating virtual adversarial loss. Defaults to nsl.configs.DistanceConfig().
num_approx_steps number of steps used to approximate the calculation of Hessian matrix required for creating virtual adversarial examples. Defaults to 1.
approx_difference the finite difference to approximate the calculation of the Hessian matrix required for creating virtual adversarial examples, namely, the xi in Equation 12 in the paper: https://arxiv.org/pdf/1704.03976.pdf. Defaults to 1e-6.

Methods

__eq__

Method generated by attrs for class VirtualAdvConfig.

__ge__

Method generated by attrs for class VirtualAdvConfig.

__gt__

Method generated by attrs for class VirtualAdvConfig.

__le__

Method generated by attrs for class VirtualAdvConfig.

__lt__

Method generated by attrs for class VirtualAdvConfig.

__ne__

Method generated by attrs for class VirtualAdvConfig.