티스토리 뷰

이전에 작성한 케라스 코드를 정리하던 도중에 다음과 같이 에러가 발생하였다. 

 

tensorflow.python.framework.errors_impl.FailedPreconditionError:Error while reading resource variable SGD/lr from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist. (Could not find resource: localhost/SGD/lr)
 [[Node: training/SGD/ReadVariableOp_7 = ReadVariableOp[dtype=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](SGD/lr)]]

 

 

주피터 노트북에서 실행해도 같은 오류 문구가 발생했다.
FailedPreconditionError: Error while reading resource variable training/SGD/Variable from Container: localhost. This could mean that the variable was uninitialized. Not found: Container localhost does not exist. (Could not find resource: localhost/training/SGD/Variable)
 [[Node: training/SGD/mul/ReadVariableOp = ReadVariableOp[dtype=DT_FLOAT, _device="/job:localhost/replica:0/task:0/device:CPU:0"](training/SGD/Variable)]]

 


이전에 동작을 확인했던 코드기 때문에 코드 자체의 오류라기 보단 버전간의 호환성 등의 문제에 의해 발생한 문제로 추정된다. 

 

 

python 3.5.0

keras 2.2.0

tensorflow 1.10.0

 

위 3가지 주요 라이브러리를 삭제 후 

python 3.6.10

keras 2.3.0

tensorflow 1.14.0 으로 재설치한 후에 문제가 해결되었다.

 

 

 

'Others > Debug' 카테고리의 다른 글

tensorflow.python.framework.errors_impl.UnknownError:  (0) 2020.09.15
ImportError: No module named 'win32api'  (0) 2020.09.01
댓글
반응형
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함