train_cnn.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:five-video-classification-methods 作者: harvitronix 项目源码 文件源码
def get_model(weights='imagenet'):
    # create the base pre-trained model
    base_model = InceptionV3(weights=weights, include_top=False)

    # add a global spatial average pooling layer
    x = base_model.output
    x = GlobalAveragePooling2D()(x)
    # let's add a fully-connected layer
    x = Dense(1024, activation='relu')(x)
    # and a logistic layer
    predictions = Dense(len(data.classes), activation='softmax')(x)

    # this is the model we will train
    model = Model(inputs=base_model.input, outputs=predictions)
    return model
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号