Changed gpu availability function to avoid deprectation warning

This commit is contained in:
romi1502
2020-09-25 13:15:19 +02:00
parent af21c21b01
commit c74ab33905

View File

@@ -69,7 +69,7 @@ def get_backend(backend):
# print("USING TENSORFLOW BACKEND !!!!!!")
# return "tensorflow"
if backend == "auto":
return "tensorflow" if tf.test.is_gpu_available() else "librosa"
return "tensorflow" if len(tf.config.list_physical_devices('GPU')) else "librosa"
return backend