首页>>人工智能->如何检测tensorflow2.0

如何检测tensorflow2.0

时间:2023-11-29 本站 点击:0

用cmd进入安装tf_g20的环境下的python,输入代码检测,如下图所示:

MicrosoftWindows[版本10.0.18362.836](c)2019MicrosoftCorporation。保留所有权利。C:\Users\waws>activatetf_g20(tf_g20)C:\Users\waws>pythonPython3.6.10|Anaconda,Inc.|(default,Mar232020,17:58:33)[MSCv.191664bit(AMD64)]onwin32Type"help","copyright","credits"or"license"formoreinformation.>>>importtensorflowastf2020-05-2109:46:58.142643:Itensorflow/stream_executor/platform/default/dso_loader.cc:44]Successfullyopeneddynamiclibrarycudart64_100.dll>>>print(tf.__version__)2.0.0>>>print(tf.test.is_gpu_available())2020-05-2109:47:58.730470:Itensorflow/core/platform/cpu_feature_guard.cc:142]YourCPUsupportsinstructionsthatthisTensorFlowbinarywasnotcompiledtouse:AVX22020-05-2109:47:58.752614:Itensorflow/stream_executor/platform/default/dso_loader.cc:44]Successfullyopeneddynamiclibrarynvcuda.dll2020-05-2109:47:59.744516:Itensorflow/core/common_runtime/gpu/gpu_device.cc:1618]Founddevice0withproperties:name:GeForceGTX1050major:6minor:1memoryClockRate(GHz):1.493pciBusID:0000:01:00.02020-05-2109:47:59.751721:Itensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25]GPUlibrariesarestaticallylinked,skipdlopencheck.2020-05-2109:47:59.759183:Itensorflow/core/common_runtime/gpu/gpu_device.cc:1746]Addingvisiblegpudevices:02020-05-2109:48:03.133562:Itensorflow/core/common_runtime/gpu/gpu_device.cc:1159]DeviceinterconnectStreamExecutorwithstrength1edgematrix:2020-05-2109:48:03.140510:Itensorflow/core/common_runtime/gpu/gpu_device.cc:1165]02020-05-2109:48:03.143501:Itensorflow/core/common_runtime/gpu/gpu_device.cc:1178]0:N2020-05-2109:48:03.151461:Itensorflow/core/common_runtime/gpu/gpu_device.cc:1304]CreatedTensorFlowdevice(/device:GPU:0with3001MBmemory)->physicalGPU(device:0,name:GeForceGTX1050,pcibusid:0000:01:00.0,computecapability:6.1)True>>>

核心的三个命令:import TensorFlow as tfprint(tf.__version__)print(tf.test.is_gpu_available())

若无报错,且检验gpu返回值为ture,即证明tensorflow2_gpu安装成功


本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:/AI/1046.html