nsl.configs.VirtualAdvConfig

View source on GitHub

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__

Return self==value.

__ge__

Automatically created by attrs.

__gt__

Automatically created by attrs.

__le__

Automatically created by attrs.

__lt__

Automatically created by attrs.

__ne__

Check equality and either forward a NotImplemented or return the result negated.