↓폴밍끼 유튜브 채널 자세히보기

텐서플로 3

도커를 활용한 Tensorflow model server에 새로운 버전의 모델 배포하기

새로운 버전의 모델을 만들어 이전 글의 0번째 단계에서와 같이 C:\Users\007_0\serving\btc_lstm\2 폴더에 saved_model함수를 써서 모델을 저장합니다. import tensorflow as tf data_path = 'C:\Users\007_0\serving\btc_lstm' modelpath = data_path + "\2" # 모델 버전 2을 의미합니다 tf.saved_model.save(model, modelpath) 끝입니다. 이렇게 저장만 해준다면 일정한 간격으로(간격 조정 가능) 텐서플로 서빙이 새로운 버전을 확인합니다. 새로운 버전을 찾으면 자동으로 버전 교체를 진행합니다. 기본적으로 대기 중인 요청이 있다면 이전 버전의 모델로 응답합니다. 새로운 요청은 새 버..

(해결방법) cannot import name 'get_config' from 'tensorflow.python.eager.context'

저 같은 경우도 텐서플로를 2.2.0에서 2.4.1로 업데이트 후 이런 에러가 떴었는데 아래 방법 참고해서 해결하였습니다. keras에서 load_model 하지 않고 아래 코드대로 load_model하니까 해결됐어요! 오 주여!!!! 감사합니다 ㅠㅠㅠ I had Tensorflow===2.2.0 and when I updated it to Tensorflow==2.4.0 this issue occurred. I think there is a conflict of keras.models.load_model and the base version of tensorflow you are using. Try running - import tensorflow as tf tf.keras.models.load_mod..