train.py 文件源码

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

项目:product-category-classifier 作者: two-tap 项目源码 文件源码
def build_image_model():
  base_model = InceptionV3(weights='imagenet', include_top=False)

   # Freeze Inception's weights - we don't want to train these
  for layer in base_model.layers:
     layer.trainable = False

  # add a fully connected layer after Inception - we do want to train these
  x = base_model.output
  x = GlobalAveragePooling2D()(x)
  x = Dense(2048, activation='relu')(x)

  return x, base_model.input


# Build the two models.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号