본문 바로가기

ML or DL23

[모델 배포하기(3/3)] TF-Serving 예제 https://ichi.pro/ko/torchserve-eseo-model-baepo-mich-sayongja-jijeong-haendeulleo-saengseong-277270280257169 Torchserve 🚀에서 모델 배포 및 사용자 지정 핸들러 생성 구조에 횃불! 이 기사에 사용 된 모든 코드는 여기에 있습니다 최근 PyTorch는 모델을 올바르게 제공하기위한 새로운 프로덕션 프레임 워크 인 torchserve를 도입했습니다. 따라서 더 이상 기한없이 ichi.pro Docker로 torchserve 설치 docker pull pytorch/torchserve:latest 모델 제공 이것은 쉬운 단계입니다. 필요한 모든 매개 변수를 사용하여 torchserve 도커 컨테이너를 실행할 수 있습니.. 2021. 11. 4.
[Jupyter notebook] column, row 생략없이 출력하기 # row 생략 없이 출력 pd.set_option('display.max_rows', None) # col 생략 없이 출력 pd.set_option('display.max_columns', None) 2. Columns 리스트 전부 출력하기 columns 수가 매우 많은 경우에, 이를 무제한으로 출력 pd.set_option('display.max_seq_items', None) 2021. 10. 26.
[USAD] 논문 리뷰 “USAD: UnSupervised Anomaly Detection on Multivariate Time Series” Unsupervised Anomaly Detection AE-based multivariate time series AD autoencoder에 adversarial training을 접목하여 AE-based 및 GAN-based multivariate time series anomaly detection 모델의 한계점을 보완한 논문 리뷰 : https://hwk0702.github.io/treatise%20review/2021/02/15/USAD/ - Autoencoder 구조인 Encoder E 와 Decoder D 를 이용 - original input vector X 와 reco.. 2021. 10. 26.
[딥러닝 환경구축] Pytorch 설치 / RTX 3090 에 맞는 pytorch 설치 환경 RTX 3090 / Windows 10 NVIDIA Driver 471.96 CUDA 11.2 cuDNN 8.1 출처 : https://ssaru.github.io/2021/05/05/20210505-til_install_rtx3090_supported_pytorch/ (TIL) RTX 3090을 지원하는 PyTorch 버전설치 2021.05.05 현재 RTX3090은 CUDA11 이상을 지원하는 딥러닝 프레임워크에 버전에서만 사용할 수 있습니다. 하지만 단순하게 pip install torch==1.7.1 torchvision==0.8.2 형태로 설치하면 CUDA error: no kernel image is ava ssaru.github.io RTX 3090 은 CUDA 버전 11 이상을 지원하.. 2021. 10. 26.
[Jupyter notebook] Jupyter Notebook에서 import torch 안될 때 Anaconda IDE 에서는 python >> import torch 가 정상 작동하나 jupyter notebook을 실행해서 import torch 를 하면 모듈 불러오기가 불가능할 때, 해결방법 : pytorch를 설치한 후, conda로 jupyter notebook을 다시 설치 conda install jupyter pytorch 설치 후 jupyter notebook을 conda로 설치해주면 torch 환경을 jupyter notebook kernel에서 사용할 수 있게 된다. * 다른 방법으로는 pytorch 설치 이후 jupyter notebook에 ipykernel을 추가 출처 : https://keepdev.tistory.com/51 2021. 10. 26.
Optimizer 정리 https://light-tree.tistory.com/141 2021. 9. 15.
CUDA 두개 버젼을 한 컴퓨터에. Tensorflow 1.x 대는 CUDA 10.x 버젼대만, Tensorflow 2.x 대는 CUDA 11.x 만 호환이 됨. 게다가 RTX 3090 은 CUDA 11 미만의 버젼을 호환하지 않기 때문에 3090 에서 tf 1 코드를 사용할 수가 없다. 2080 Ti 에서 tf1, tf2 모두를 테스트하기 위해 CUDA 10.x, CUDA 11.x 버젼을 모두 설치하고자한다. 출처 : https://m31phy.tistory.com/125 [CUDA] 한 컴퓨터에 여러 버전 cuda 설치하기 저의 경우에는 Diskless cluster 구조에서 몇몇 계산노드들이 서로 다른 그래픽 카드를 가지고 있습니다. 그래서 서로 다른 버전의 cuda를 설치해야하나 싶었지만, 조사를 하다보니 CUDA SDK의 comp.. 2021. 9. 14.
[Loss 함수] loss 함수의 종류 및 비교, 사용 출처 : https://needjarvis.tistory.com/567 Binary Crossentropy 실제 레이블과 예측 레이블 간의 교차 엔트로피 손실을 계산한다. 2개의 레이블 클래스(0, 1로 가정)가 있을 때 Binary Crossentropy를 사용하면 좋다. BinaryCrossentropy class tf.keras.losses.BinaryCrossentropy( from_logits=False, label_smoothing=0, reduction="auto", name="binary_crossentropy" ) 2. Categorical Crossentropy 레이블 클래스가 2개 이상일 경우 사용된다. One -hot -encoding 형태로 제공 될 때 사용가능 보통 softmax.. 2021. 9. 14.
[모델 배포하기(2/2)] TF-Serving 예제 출처 : http://solarisailab.com/archives/2703 36. 텐서플로우 서빙(TensorFlow Serving)을 이용한 딥러닝(Deep Learning) 모델 추론을 위한 REST API 서버 구 이번 시간에는 텐서플로우 서빙(TensorFlow Serving)을 이용해서 딥러닝(Deep Learning) 모델 추론을 위한 REST API 서버를 구현하는 방법을 알아보자. [1] 텐서플로우 서빙(TensorFlow Serving) 텐서플로우 서빙(Te solarisailab.com docker pull tensorflow/serving docker run -t --rm -p 8501:8501 \ -v "/home/solaris/Desktop/tf_serving/saved_mode.. 2021. 9. 6.