<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/neural-structured-learning/blob/v1.4.0/neural_structured_learning/configs/configs.py#L278-L299) |

Contains configuration for virtual adversarial training.

    nsl.configs.VirtualAdvConfig(
        adv_neighbor_config=attr_dict['adv_neighbor_config'].default,
        distance_config=attr_dict['distance_config'].default,
        num_approx_steps=attr_dict['num_approx_steps'].default,
        approx_difference=attr_dict['approx_difference'].default
    )

<br />

<br />

<br />

| ## Attributes ||
|---|---|
| `adv_neighbor_config` | an [`nsl.configs.AdvNeighborConfig`](https://www.tensorflow.org/neural_structured_learning/api_docs/python/nsl/configs/AdvNeighborConfig) object for generating virtual adversarial examples. Defaults to [`nsl.configs.AdvNeighborConfig()`](https://www.tensorflow.org/neural_structured_learning/api_docs/python/nsl/configs/AdvNeighborConfig). |
| `distance_config` | a [`nsl.configs.DistanceConfig`](https://www.tensorflow.org/neural_structured_learning/api_docs/python/nsl/configs/DistanceConfig) object for calculating virtual adversarial loss. Defaults to [`nsl.configs.DistanceConfig()`](https://www.tensorflow.org/neural_structured_learning/api_docs/python/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. |

<br />

## Methods

### `__eq__`

    __eq__(
        other
    )

Method generated by attrs for class VirtualAdvConfig.

### `__ge__`

    __ge__(
        other
    )

Method generated by attrs for class VirtualAdvConfig.

### `__gt__`

    __gt__(
        other
    )

Method generated by attrs for class VirtualAdvConfig.

### `__le__`

    __le__(
        other
    )

Method generated by attrs for class VirtualAdvConfig.

### `__lt__`

    __lt__(
        other
    )

Method generated by attrs for class VirtualAdvConfig.

### `__ne__`

    __ne__(
        other
    )

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