onnx 파일의 shape 확인하기Deep Learning & Machine Learning/강좌&예제 코드2023. 11. 5. 08:45
Table of Contents
반응형
onnx 파일의 shape를 확인하는 방법입니다.
2023. 11. 5 최초작성
참고
https://stackoverflow.com/questions/56734576/find-input-shape-from-onnx-file
>>> import onnxruntime as ort
>>> model = ort.InferenceSession("bytetrack_s.onnx", providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
C:\Users\jeong\miniconda3\envs\bytetrack\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py:53: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'CPUExecutionProvider'
warnings.warn("Specified provider '{}' is not in available provider names."
>>> input_shape = model.get_inputs()[0].shape
>>> print(input_shape)
[1, 3, 608, 1088]
>>>
반응형
'Deep Learning & Machine Learning > 강좌&예제 코드' 카테고리의 다른 글
AUC - ROC Curve 이해하기 (0) | 2024.04.01 |
---|---|
Tensorflow에서 재현 가능한 결과(reproducible results) 얻기 (0) | 2024.03.28 |
캐글 딥러닝 강좌 정리 3 - 과적합(Overfitting)과 해결 방법(dropout, batch normalization) (0) | 2023.10.26 |
캐글 딥러닝 강좌 정리 2 - 확률적 경사 하강법(Stochastic Gradient Descent), 손실함수, 옵티마이저 (0) | 2023.10.26 |
캐글 딥러닝 강좌 정리 1 - 뉴런(Neuron)과 깊은 신경망(DNN) (0) | 2023.10.26 |