7c6b9940261af254f033e05b914c336bbb8e7958,tests/api_tests.py,,,#,7

Before Change


eps = 1e-12

torch.set_default_dtype(torch.float64)
TEST_DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")


def max_abs(tensor):
    return torch.max(torch.abs(tensor))

After Change


from problems import construct_problem, DTYPES, DEVICES, ADAPTIVE_METHODS


EPS = {torch.float32: 1e-5, torch.float64: 1e-12}


class TestCollectionState(unittest.TestCase):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: rtqichen/torchdiffeq
Commit Name: 7c6b9940261af254f033e05b914c336bbb8e7958
Time: 2020-08-04
Author: 33688385+patrick-kidger@users.noreply.github.com
File Name: tests/api_tests.py
Class Name:
Method Name:


Project Name: bethgelab/foolbox
Commit Name: a04525112543a5dbf77401cde45442932aeec368
Time: 2020-01-26
Author: git@jonasrauber.de
File Name: foolbox/ext/native/models/pytorch.py
Class Name: PyTorchModel
Method Name: __init__


Project Name: bethgelab/foolbox
Commit Name: a04525112543a5dbf77401cde45442932aeec368
Time: 2020-01-26
Author: git@jonasrauber.de
File Name: foolbox/ext/native/models/tensorflow.py
Class Name: TensorFlowModel
Method Name: __init__