Beispiel #1
0
def test_arctanh(t: Tensor) -> Tensor:
    return ep.arctanh((t - t.mean()) / t.max())
Beispiel #2
0
def verify_input_bounds(input: ep.Tensor, model: Model) -> None:
    # verify that input to the attack lies within model's input bounds
    assert input.min().item() >= model.bounds.lower
    assert input.max().item() <= model.bounds.upper