Keras 모델 전체 파라미터 개수 세기Deep Learning & Machine Learning/Keras2023. 10. 22. 05:45
Table of Contents
반응형
Keras 모델의 전체 파라미터 개수를 출력하는 예제 코드입니다.
2023. 7. 19. 최초작성
from tensorflow.keras.applications import EfficientNetB0 # 모델을 로드합니다. model = EfficientNetB0(weights='imagenet') # 전체 파라미터 개수를 가져와 출력합니다. total_params = model.count_params() print(f'전체 파라미터 개수 = {total_params}') |
실행해보면 EfficientNetB0 모델의 전체 파라미터 개수를 출력해줍니다.
전체 파라미터 개수 = 5330571
반응형
'Deep Learning & Machine Learning > Keras' 카테고리의 다른 글
Optuna를 사용한 Keras 분류 모델 하이퍼파라미터 최적화 - iris (0) | 2023.11.05 |
---|---|
Keras MNIST Image Classification 예제 (0) | 2023.10.30 |
tf.keras.applications.EfficientNet 모델 사용시 주의할 점 (0) | 2023.10.10 |
Keras와 OpenCV를 사용하여 손글씨 숫자 인식하기 (0) | 2023.10.09 |
TensorFlow 예제 - Keras + OpenCV를 사용하여 실제 손글씨 숫자 인식 (0) | 2023.10.09 |