keras 에 클래식 네트워크 의 예비 훈련 모델(VGG 16 을 예 로 들 면)
1159 단어 keras
# VGG16
from keras.applications.vgg16 import VGG16
print('Start build VGG16 -------')
# vgg16 , vgg16 :include_top=True
model_vgg16_conv = VGG16(weights='imagenet', include_top=False)
model_vgg16_conv.summary()
#
# if K.image_data_format() == 'channels_first':
# input_shape = (3, img_width, img_height)
# else:
# input_shape = (img_width, img_height, 3)
input = Input(input_shape, name = 'image_input') # ,Keras Input
# vgg16
output_vgg16_conv = model_vgg16_conv(input)
# output_vgg16_conv vgg16 , ,
x = Flatten(name='flatten')(output_vgg16_conv)
x = Dense(4096, activation='relu', name='fc1')(x)
x = Dense(512, activation='relu', name='fc2')(x)
x = Dense(128, activation='relu', name='fc3')(x)
x = Dense(1, activation='softmax', name='predictions')(x)
# vgg16
my_model = Model(input=input, output=x)
# ,vgg16 ,
print('
This is my vgg16 model for the task')
my_model.summary()
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
KERA의 반복 레이어 시각적 안내서따라서 그림에서 우리는 크기가 4인 숨겨진 상태가 어떻게 RNN 블록 따라서 전체 문장에 대해 우리는 RNN 층에서 크기가 4인 벡터를 출력합니다. 그림에서 보듯이 우리는 무작위 입력 데이터를 만들었는데 그 중 한 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.