2023-06-10 16:51:11.329824: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudnn64_7.dll 2023-06-10 16:56:47.339190: W tensorflow/stream_executor/cuda/redzone_allocator.cc:312] Internal: Invoking ptxas not supported on Windows Relying on driver to perform ptx compilation. This message will be only logged once. 2023-06-10 16:56:47.537030: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cublas64_100.dll Traceback (most recent call last):
时间: 2024-01-29 20:04:37 浏览: 289
看起来这是一个 TensorFlow 在 Windows 操作系统上运行时遇到的警告和错误消息。警告消息 "Internal: Invoking ptxas not supported on Windows" 表示在 Windows 操作系统上使用 ptxas 编译器的操作不受支持,因此必须依赖驱动程序来执行 ptx 编译。错误消息的具体内容需要查看 Traceback 中的栈跟踪信息才能确定。请提供更多上下文信息以获得更准确的答案。
相关问题
2023-06-05 16:56:08.991505: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2023-06-05 16:56:08.991599: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
这是 TensorFlow 在启动时发出的警告信息,说明在当前的系统环境中找不到 CUDA 运行库文件 cudart64_110.dll,可能是因为您没有正确安装 CUDA 或者没有将 CUDA 相关的路径添加到环境变量中。如果您不需要使用 GPU 运行 TensorFlow,可以忽略此警告;如果需要使用 GPU,请检查您的 CUDA 安装是否正确,并将 CUDA 相关的路径添加到 PATH 环境变量中。
2023-06-17 23:47:22.786162: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found 2023-06-17 23:47:22.786281: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. 2023-06-17 23:47:24.419330: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'nvcuda.dll'; dlerror: nvcuda.dll not found 2023-06-17 23:47:24.419809: W tensorflow/stream_executor/cuda/cuda_driver.cc:263] failed call to cuInit: UNKNOWN ERROR (303) 2023-06-17 23:47:24.426229: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:169] retrieving CUDA diagnostic information for host: ����� 2023-06-17 23:47:24.426345: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:176] hostname: ����� 2023-06-17 23:47:24.430552: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX AVX2 To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags. Traceback (most recent call last): File "C:\Users\10290\Desktop\test\writer.py", line 20, in <module> write_reward_tb(summary_writer, rewards[i], i) File "C:\Users\10290\Desktop\test\writer.py", line 9, in write_reward_tb summary = tf.Summary(value=[tf.Summary.Value(tag='reward', simple_value=reward)]) AttributeError: module 'tensorflow' has no attribute 'Summary'分析错误原因
这个错误是由于TensorFlow 2.x版本中`tf.Summary`已被弃用所致。相反,你应该使用`tf.summary.Summary`。你需要将代码更新为:
```
summary = tf.summary.Summary(value=[tf.summary.Summary.Value(tag='reward', simple_value=reward)])
```
这样就可以避免这个错误了。另外,还需要注意,TensorFlow 2.x版本中`tf.summary.FileWriter`已经被弃用,应该使用`tf.summary.create_file_writer`来创建一个`tf.summary.FileWriter`的实例。
阅读全文