INVESTAR / StockAnalysisInPython

452 stars 411 forks source link

tensorflow문제 #131

Open kapino100 opened 2 years ago

kapino100 commented 2 years ago

PS C:\Users\right\OneDrive\바탕 화면\Investar> & C:/Users/right/AppData/Local/Programs/Python/Python310/python.exe "c:/Users/right/OneDrive/바탕 화면/Investar/a.py" 2022-02-02 16:21:29.960846: I tensorflow/core/platform/cpu_feature_guard.cc:151] 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.2022-02-02 16:21:30.386720: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 2151 MB memory: -> device: 0, name: NVIDIA GeForce GTX 1650 Ti with Max-Q Design, pci bus id: 0000:02:00.0, compute capability: 7.5 2022-02-02 16:21:32.265802: E tensorflow/stream_executor/cuda/cuda_dnn.cc:361] Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0. CuDNN library needs to have matching major version and equal or higher minor version. If using a binary install, upgrade your CuDNN library. If building from sources, make sure the library loaded at runtime is compatible with the version specified during compile configuration. 2022-02-02 16:21:32.267231: W tensorflow/core/framework/op_kernel.cc:1745] OP_REQUIRES failed at cudnn_rnn_ops.cc:1556 : UNKNOWN: Fail to find the dnn implementation. Traceback (most recent call last): File "c:\Users\right\OneDrive\바탕 화면\Investar\a.py", line 58, in lstm_model.fit(x_train_data,y_train_data,epochs=1,batch_size=1,verbose=2) File "C:\Users\right\AppData\Local\Programs\Python\Python310\lib\site-packages\keras\utils\traceback_utils.py", line 67, in error_handler raise e.with_traceback(filtered_tb) from None File "C:\Users\right\AppData\Local\Programs\Python\Python310\lib\site-packages\tensorflow\python\eager\execute.py", line 54, in quick_execute tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, tensorflow.python.framework.errors_impl.UnknownError: Graph execution error:

Fail to find the dnn implementation. [[{{node CudnnRNN}}]] [[sequential/lstm/PartitionedCall]] [Op:__inference_train_function_4539]

하나 해결하면 또하나가 문제를 만들어서 부족한 dll이랑 다 다운받아서 넣었는데 문제가 더 커졌습니다.. 누가 해결방법좀 아시면 도와주십쇼.. 화딱지나서 컴퓨터 부실거같습니다..

INVESTAR commented 2 years ago

제가 책을 집필하던 당시에 사용한 버전은 파이썬 3.8.1 64비트 + tensorflow 2.20입니다.

Loaded runtime CuDNN library: 8.0.5 but source was compiled with: 8.1.0. 
CuDNN library needs to have matching major version and equal or higher minor version. 
If using a binary install, upgrade your CuDNN library. 
If building from sources, make sure the library loaded at runtime is compatible with 
the version specified during compile configuration.

올려주신 오류 메시지를 보면 로드된 CuDNN library는 8.0.5인데 소스코드는 8.1.0으로 컴파일되어 있다고 나와있습니다.

현재 독자님 PC에 설치되어 있는 파이썬은 3.1.0 버전인 것 같은데 함께 설치한 tensorflow 버전이 파이썬 3.1.0을 지원하는지 확인해 보시기 바랍니다.