Commit b335a7ba authored by Yuxin Wu's avatar Yuxin Wu

split_v was removed already (tf#6405)

parent e94abf66
...@@ -65,7 +65,7 @@ class Model(ModelDesc): ...@@ -65,7 +65,7 @@ class Model(ModelDesc):
transform2 = tf.concat_v2([padded2[:, :, :, 0], padded2[:, :, :, 1]], 1) transform2 = tf.concat_v2([padded2[:, :, :, 0], padded2[:, :, :, 1]], 1)
stacked = tf.concat_v2([img_orig, transform1, transform2], 2, 'viz') stacked = tf.concat_v2([img_orig, transform1, transform2], 2, 'viz')
tf.summary.image('visualize', tf.summary.image('visualize',
tf.expand_dims(stacked, -1), max_images=30) tf.expand_dims(stacked, -1), max_outputs=30)
sampled = tf.concat_v2([sampled1, sampled2], 3, 'sampled_concat') sampled = tf.concat_v2([sampled1, sampled2], 3, 'sampled_concat')
logits = (LinearWrap(sampled) logits = (LinearWrap(sampled)
......
...@@ -54,8 +54,8 @@ def Conv2D(x, out_channel, kernel_shape, ...@@ -54,8 +54,8 @@ def Conv2D(x, out_channel, kernel_shape,
conv = tf.nn.conv2d(x, W, stride, padding) conv = tf.nn.conv2d(x, W, stride, padding)
else: else:
# TODO rename to split later # TODO rename to split later
inputs = tf.split_v(x, split, 3) inputs = tf.split(x, split, 3)
kernels = tf.split_v(W, split, 3) kernels = tf.split(W, split, 3)
outputs = [tf.nn.conv2d(i, k, stride, padding) outputs = [tf.nn.conv2d(i, k, stride, padding)
for i, k in zip(inputs, kernels)] for i, k in zip(inputs, kernels)]
conv = tf.concat_v2(outputs, 3) conv = tf.concat_v2(outputs, 3)
......
...@@ -74,14 +74,14 @@ def ImageSample(inputs, borderMode='repeat'): ...@@ -74,14 +74,14 @@ def ImageSample(inputs, borderMode='repeat'):
diff = mapping - lcoor diff = mapping - lcoor
neg_diff = 1.0 - diff # bxh2xw2x2 neg_diff = 1.0 - diff # bxh2xw2x2
lcoory, lcoorx = tf.split_v(lcoor, 2, 3) lcoory, lcoorx = tf.split(lcoor, 2, 3)
ucoory, ucoorx = tf.split_v(ucoor, 2, 3) ucoory, ucoorx = tf.split(ucoor, 2, 3)
lyux = tf.concat_v2([lcoory, ucoorx], 3) lyux = tf.concat_v2([lcoory, ucoorx], 3)
uylx = tf.concat_v2([ucoory, lcoorx], 3) uylx = tf.concat_v2([ucoory, lcoorx], 3)
diffy, diffx = tf.split_v(diff, 2, 3) diffy, diffx = tf.split(diff, 2, 3)
neg_diffy, neg_diffx = tf.split_v(neg_diff, 2, 3) neg_diffy, neg_diffx = tf.split(neg_diff, 2, 3)
# prod = tf.reduce_prod(diff, 3, keep_dims=True) # prod = tf.reduce_prod(diff, 3, keep_dims=True)
# diff = tf.Print(diff, [tf.is_finite(tf.reduce_sum(diff)), tf.shape(prod), # diff = tf.Print(diff, [tf.is_finite(tf.reduce_sum(diff)), tf.shape(prod),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment