|
@@ -122,7 +122,7 @@ def inception_v3(inputs,
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 32, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch5x5, branch3x3dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch5x5, branch3x3dbl, branch_pool])
|
|
|
end_points['mixed_35x35x256a'] = net
|
|
|
# mixed_1: 35 x 35 x 288.
|
|
|
with tf.variable_scope('mixed_35x35x288a'):
|
|
@@ -138,7 +138,7 @@ def inception_v3(inputs,
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 64, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch5x5, branch3x3dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch5x5, branch3x3dbl, branch_pool])
|
|
|
end_points['mixed_35x35x288a'] = net
|
|
|
# mixed_2: 35 x 35 x 288.
|
|
|
with tf.variable_scope('mixed_35x35x288b'):
|
|
@@ -154,7 +154,7 @@ def inception_v3(inputs,
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 64, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch5x5, branch3x3dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch5x5, branch3x3dbl, branch_pool])
|
|
|
end_points['mixed_35x35x288b'] = net
|
|
|
# mixed_3: 17 x 17 x 768.
|
|
|
with tf.variable_scope('mixed_17x17x768a'):
|
|
@@ -167,7 +167,7 @@ def inception_v3(inputs,
|
|
|
stride=2, padding='VALID')
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.max_pool(net, [3, 3], stride=2, padding='VALID')
|
|
|
- net = tf.concat(axis=[branch3x3, branch3x3dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch3x3, branch3x3dbl, branch_pool])
|
|
|
end_points['mixed_17x17x768a'] = net
|
|
|
# mixed4: 17 x 17 x 768.
|
|
|
with tf.variable_scope('mixed_17x17x768b'):
|
|
@@ -186,7 +186,7 @@ def inception_v3(inputs,
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 192, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch7x7, branch7x7dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch7x7, branch7x7dbl, branch_pool])
|
|
|
end_points['mixed_17x17x768b'] = net
|
|
|
# mixed_5: 17 x 17 x 768.
|
|
|
with tf.variable_scope('mixed_17x17x768c'):
|
|
@@ -205,7 +205,7 @@ def inception_v3(inputs,
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 192, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch7x7, branch7x7dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch7x7, branch7x7dbl, branch_pool])
|
|
|
end_points['mixed_17x17x768c'] = net
|
|
|
# mixed_6: 17 x 17 x 768.
|
|
|
with tf.variable_scope('mixed_17x17x768d'):
|
|
@@ -224,7 +224,7 @@ def inception_v3(inputs,
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 192, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch7x7, branch7x7dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch7x7, branch7x7dbl, branch_pool])
|
|
|
end_points['mixed_17x17x768d'] = net
|
|
|
# mixed_7: 17 x 17 x 768.
|
|
|
with tf.variable_scope('mixed_17x17x768e'):
|
|
@@ -243,7 +243,7 @@ def inception_v3(inputs,
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 192, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch7x7, branch7x7dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch7x7, branch7x7dbl, branch_pool])
|
|
|
end_points['mixed_17x17x768e'] = net
|
|
|
# Auxiliary Head logits
|
|
|
aux_logits = tf.identity(end_points['mixed_17x17x768e'])
|
|
@@ -276,7 +276,7 @@ def inception_v3(inputs,
|
|
|
stride=2, padding='VALID')
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.max_pool(net, [3, 3], stride=2, padding='VALID')
|
|
|
- net = tf.concat(axis=[branch3x3, branch7x7x3, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch3x3, branch7x7x3, branch_pool])
|
|
|
end_points['mixed_17x17x1280a'] = net
|
|
|
# mixed_9: 8 x 8 x 2048.
|
|
|
with tf.variable_scope('mixed_8x8x2048a'):
|
|
@@ -284,17 +284,17 @@ def inception_v3(inputs,
|
|
|
branch1x1 = ops.conv2d(net, 320, [1, 1])
|
|
|
with tf.variable_scope('branch3x3'):
|
|
|
branch3x3 = ops.conv2d(net, 384, [1, 1])
|
|
|
- branch3x3 = tf.concat(axis=[ops.conv2d(branch3x3, 384, [1, 3]),
|
|
|
- ops.conv2d(branch3x3, 384, [3, 1])], values=3)
|
|
|
+ branch3x3 = tf.concat(axis=3,values=[ops.conv2d(branch3x3, 384, [1, 3]),
|
|
|
+ ops.conv2d(branch3x3, 384, [3, 1])])
|
|
|
with tf.variable_scope('branch3x3dbl'):
|
|
|
branch3x3dbl = ops.conv2d(net, 448, [1, 1])
|
|
|
branch3x3dbl = ops.conv2d(branch3x3dbl, 384, [3, 3])
|
|
|
- branch3x3dbl = tf.concat(axis=[ops.conv2d(branch3x3dbl, 384, [1, 3]),
|
|
|
- ops.conv2d(branch3x3dbl, 384, [3, 1])], values=3)
|
|
|
+ branch3x3dbl = tf.concat(axis=3, values=[ops.conv2d(branch3x3dbl, 384, [1, 3]),
|
|
|
+ ops.conv2d(branch3x3dbl, 384, [3, 1])])
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 192, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch3x3, branch3x3dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch3x3, branch3x3dbl, branch_pool])
|
|
|
end_points['mixed_8x8x2048a'] = net
|
|
|
# mixed_10: 8 x 8 x 2048.
|
|
|
with tf.variable_scope('mixed_8x8x2048b'):
|
|
@@ -302,17 +302,17 @@ def inception_v3(inputs,
|
|
|
branch1x1 = ops.conv2d(net, 320, [1, 1])
|
|
|
with tf.variable_scope('branch3x3'):
|
|
|
branch3x3 = ops.conv2d(net, 384, [1, 1])
|
|
|
- branch3x3 = tf.concat(axis=[ops.conv2d(branch3x3, 384, [1, 3]),
|
|
|
- ops.conv2d(branch3x3, 384, [3, 1])], values=3)
|
|
|
+ branch3x3 = tf.concat(axis=3, values=[ops.conv2d(branch3x3, 384, [1, 3]),
|
|
|
+ ops.conv2d(branch3x3, 384, [3, 1])])
|
|
|
with tf.variable_scope('branch3x3dbl'):
|
|
|
branch3x3dbl = ops.conv2d(net, 448, [1, 1])
|
|
|
branch3x3dbl = ops.conv2d(branch3x3dbl, 384, [3, 3])
|
|
|
- branch3x3dbl = tf.concat(axis=[ops.conv2d(branch3x3dbl, 384, [1, 3]),
|
|
|
- ops.conv2d(branch3x3dbl, 384, [3, 1])], values=3)
|
|
|
+ branch3x3dbl = tf.concat(axis=3, values=[ops.conv2d(branch3x3dbl, 384, [1, 3]),
|
|
|
+ ops.conv2d(branch3x3dbl, 384, [3, 1])])
|
|
|
with tf.variable_scope('branch_pool'):
|
|
|
branch_pool = ops.avg_pool(net, [3, 3])
|
|
|
branch_pool = ops.conv2d(branch_pool, 192, [1, 1])
|
|
|
- net = tf.concat(axis=[branch1x1, branch3x3, branch3x3dbl, branch_pool], values=3)
|
|
|
+ net = tf.concat(axis=3, values=[branch1x1, branch3x3, branch3x3dbl, branch_pool])
|
|
|
end_points['mixed_8x8x2048b'] = net
|
|
|
# Final pooling and prediction
|
|
|
with tf.variable_scope('logits'):
|