Show and Tell Lessons learned from the 2015 MSCOCO Image Captioning Challenge论文及tensorflow源码解读(2)

本文深入探讨如何利用预训练的Inception V3模型进行图像特征提取,结合LSTM进行图像标题生成。通过TensorFlow实现训练过程,包括模型构建、学习率设置及训练操作。
摘要由CSDN通过智能技术生成

Source code

build_model

build_image_embeddings

在建立了图片和caption的输入后,这部分将图片转换为固定大小的tensor,就像论文提及的,使用已经用很大的数据集训练好的深度网络模型,不改变它的参数,直接用于特征提取。

首先将图片丢入inception v3网络中,得到输出,代码如下:

inception_output = image_embedding.inception_v3(
        self.images,
        trainable=self.train_inception,
        is_training=self.is_training())

这里我们先来看一下inception v3这个模型。inception model
“Rethinking the Inception Architecture for Computer Vision”slim包中提供的inception_v3函数直接返回论文中提到的模型。

Map inception output into embedding space.
这里直接用inception的输出作为图片的特征,并且通过一个全联接层,作为embedding。

with tf.variable_scope("image_embedding") as scope:
  image_embeddings = tf.contrib
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值