Skip to content

Commit e1e08a2

Browse files
Johannes Ball?copybara-github
authored andcommitted
Replaces deprecated tf.test.is_gpu_available.
This avoids a potential bug triggered by the unit test. PiperOrigin-RevId: 281405747 Change-Id: I1162443f6a32f7bde319873466833a94d0f3180a
1 parent 394392f commit e1e08a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tensorflow_compression/python/layers/signal_conv_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def is_implemented(self, batch, input_support, channels, filters,
222222
def data_formats(self):
223223
# On CPU, many ops don't support the channels first data format. Hence, if
224224
# no GPU is available, we skip these tests.
225-
if tf.test.is_gpu_available(cuda_only=True):
225+
if tf.config.experimental.list_physical_devices("GPU"):
226226
return ("channels_first", "channels_last")
227227
else:
228228
return ("channels_last",)

0 commit comments

Comments
 (0)