728x90
반응형
특정 레이어의 입력/출력 크기를 알고 싶다면
- layer.get_input_at(node_index)
- layer.get_output_at(node_index)
- layer.get_input_shape_at(node_index)
- layer.get_output_shape_at(node_index)
예시)
model = VGG16(weights='imagenet', include_top=False)
input_shape = model.layers[-4].get_input_shape_at(0)
VGG16 모델을 사용하려 할 때, 끝에서 4번째 층의 입력 shape 을 알고 싶을 때
Source:
https://www.kaggle.com/code/vincee/intel-image-classification-cnn-keras/notebook
728x90
반응형
'Data Science > Deep Learning' 카테고리의 다른 글
Tesorflow JPEG 이미지 텐서로 변환하기 (0) | 2022.11.18 |
---|---|
Kaggle 에서 TPU 무료로 사용하기 (0) | 2022.11.18 |
Keras fit_generator 대신 fit 사용하기 (0) | 2022.11.16 |
Keras ReduceLROnPlateau 클래스 (0) | 2022.11.15 |
Tensorflow 이미지 로드하는 방법 (0) | 2022.11.14 |
댓글