图像的仿射变换公式可以表示如下
一般情况下将空间变换层置于卷及神经网络模型中间(卷积或者池化层后面)
conv->maxpool->conv->maxpool->conv->maxpool->dense(1000)->dense(6)------>st--->省略
L-------------------------------------------------------|
示例代码如下:
pool2_loc = end_points['pool3'] end_points['reshape0'] = tf.reshape(end_points['pool3'], [-1, pool2_loc.get_shape()[