File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
neural_structured_learning/configs Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -90,9 +90,12 @@ def make_adv_reg_config(
9090
9191 Args:
9292 multiplier: multiplier to adversarial regularization loss. Defaults to 0.2.
93- feature_mask: mask (w/ 0-1 values) applied on the gradient. The shape should
94- be the same as (or broadcastable to) input features. If set to `None`, no
95- feature mask will be applied.
93+ feature_mask: mask (w/ values of 0.0 or 1.0) applied on the gradient. Its
94+ shape should be the same as (or broadcastable to) the input features:
95+ input features corresponding to mask values of 0.0 are *not* be perturbed,
96+ while those corresponding to mask values of 1.0 are considered
97+ perturbable. If set to `None`, all input features are considered
98+ perturbable.
9699 adv_step_size: step size to find the adversarial sample. Defaults to 0.001.
97100 adv_grad_norm: type of tensor norm to normalize the gradient. Input will be
98101 converted to `NormType` when applicable (e.g., a value of 'l2' will be
You can’t perform that action at this time.
0 commit comments