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

Python library & package 36

Tensorflow Model Server 정복 (REST API, WSL2 사용, LSTM 모델)

저는 Tensorflow Model Server를 아무것도 모르는 상태에서 구현하기 위해 많은 애를 써야 했습니다. 그래서 저의 경험을 바탕으로 다른 분들은 조금이라도 쉽게 이에 접근하실 수 있도록 포스트를 작성합니다! 방법은 크게 5단계입니당!! 0. 일단은 학습한 모델을 다음과 같이 tensorflow의 saved_model 함수를 써서 저장해야 합니다. (여기엔 생략된 것이지 위쪽에 model=Sequential() 해서 LSTM 모델 학습을 시켜주었습니다) import tensorflow as tf data_path = 'C:\Users\007_0\serving\btc_lstm' modelpath = data_path + "/1" # 모델 버전 1을 의미합니다 tf.saved_model.save(..

pandas timestamp형을 문자열로 변환

https://rfriend.tistory.com/498 [Python pandas] Pyhon datetime, pandas Timestamp을 문자열(string)로 변환, 문자열을 datetime, Timestamp로 변환하 지난번 포스팅에서는 Python standard datetime과 pandas Timestamp 객체로 날짜-시간 데이터를 입력, 변환, 조회하는 방법을 소개하였습니다. 이번 포스팅에서는 (1) Python datetime, pandas Timestamp 객체를.. rfriend.tistory.com

(해결방법) 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..

[펌] save, load_model 과 save_weights, load_weights의 차이점

https://ltlkodae.tistory.com/13 케라스(keras) 모델 저장(save) 및 불러오는(load) 2가지 방법 케라스 모델을 저장하고 불러오는 2가지 방법에 대해서 설명드리겠습니다. 모델 만들기 먼저 모델을 만들어야 겠죠? 7개 Layer 로 된 간단한 분류 모델을 만들었습니다. import tensorflow as tf from sklear ltlkodae.tistory.com