File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
tensorflow_compression/python Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 2323
2424class DeepFactorizedTest (tf .test .TestCase , parameterized .TestCase ):
2525
26+ def setUp (self ):
27+ super ().setUp ()
28+ # Disable TensorFloat-32 format on A100 platform, as precision is too low
29+ # for current test assertions.
30+ tf .config .experimental .enable_tensor_float_32_execution (False )
31+
2632 def test_can_instantiate_scalar (self ):
2733 df = deep_factorized .DeepFactorized ()
2834 self .assertEqual (df .batch_shape , ())
@@ -66,6 +72,12 @@ def test_broadcasts_correctly(self, method):
6672
6773class NoisyDeepFactorizedTest (tf .test .TestCase ):
6874
75+ def setUp (self ):
76+ super ().setUp ()
77+ # Disable TensorFloat-32 format on A100 platform, as precision is too low
78+ # for current test assertions.
79+ tf .config .experimental .enable_tensor_float_32_execution (False )
80+
6981 def test_can_instantiate_and_run_scalar (self ):
7082 df = deep_factorized .NoisyDeepFactorized (num_filters = (2 , 3 , 4 ))
7183 self .assertEqual (df .batch_shape , ())
Original file line number Diff line number Diff line change 2323
2424class GDNTest (tf .test .TestCase , parameterized .TestCase ):
2525
26+ def setUp (self ):
27+ super ().setUp ()
28+ # Disable TensorFloat-32 format on A100 platform, as precision is too low
29+ # for current test assertions.
30+ tf .config .experimental .enable_tensor_float_32_execution (False )
31+
2632 def test_invalid_data_format_raises_error (self ):
2733 with self .assertRaises (ValueError ):
2834 gdn .GDN (data_format = "NHWC" )
You can’t perform that action at this time.
0 commit comments