代码很简短,目前正在学习中。
import tensorflow as tf
a = [[1, 0, 3], [8, -3, 6], [5, 1, 7]]
with tf.Session() as sess:
print(sess.run(tf.argmax(a, 1)))
print(sess.run(tf.argmax(a, 0)))
输出结果如下,不知道为什么会出现这些提示,求高人指点。
E:\anaconda\python.exe D:/pycharm文件/try.py
2020-01-09 22:18:54.342546: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
WARNING:tensorflow:From D:/pycharm文件/try.py:5: The name tf.Session is deprecated. Please use tf.compat.v1.Session instead.
2020-01-09 22:18:56.348961: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2020-01-09 22:18:57.534582: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties:
name: GeForce GTX 1660 Ti with Max-Q Design major: 7 minor: 5 memoryClockRate(GHz): 1.335
pciBusID: 0000:01:00.0
2020-01-09 22:18:57.535147: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2020-01-09 22:18:57.539354: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll
2020-01-09 22:18:57.543360: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cufft64_100.dll
2020-01-09 22:18:57.545647: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library curand64_100.dll
2020-01-09 22:18:57.550333: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusolver64_100.dll
2020-01-09 22:18:57.554235: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cusparse64_100.dll
2020-01-09 22:18:57.556270: W tensorflow/stream_executor/platform/default/dso_loader.cc:55] Could not load dynamic library 'cudnn64_7.dll'; dlerror: cudnn64_7.dll not found
2020-01-09 22:18:57.556681: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1641] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
2020-01-09 22:18:57.558041: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
2020-01-09 22:18:57.560801: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2020-01-09 22:18:57.561152: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]
[2 0 2]
[1 2 2]
Process finished with exit code 0