class Voxel_flow_model(object):
def __init__(self, is_train=True):
self.is_train = is_train
class Voxel_flow_model(object):
def __init__(self, is_train=True):
self.is_train = is_train
net = slim.conv2d(net, 64, [5, 5], stride=1, scope='conv6')
net = slim.conv2d(net, 3, [5, 5], stride=1, activation_fn=tf.tanh,
normalizer_fn=None, scope='conv7')
net = slim.conv2d(net, 64, [5, 5], stride=1, scope='conv6')
net = slim.conv2d(net, 3, [5, 5], stride=1, activation_fn=tf.tanh,
normalizer_fn=None, scope='conv7')
flow = net[:, :, :, 0:2]
mask = tf.expand_dims(net[:, :, :, 2], 3)
grid_x, grid_y = meshgrid(256, 256)
flow = net[:, :, :, 0:2]
mask = tf.expand_dims(net[:, :, :, 2], 3)
grid_x, grid_y = meshgrid(256, 256)
- grid_x = tf.tile(grid_x, [32, 1, 1]) # batch_size = 32
- grid_y = tf.tile(grid_y, [32, 1, 1]) # batch_size = 32
+ grid_x = tf.tile(grid_x, [FLAGS.batch_size, 1, 1])
+ grid_y = tf.tile(grid_y, [FLAGS.batch_size, 1, 1])
mask = tf.tile(mask, [1, 1, 1, 3])
net = tf.multiply(mask, output_1) + tf.multiply(1.0 - mask, output_2)
mask = tf.tile(mask, [1, 1, 1, 3])
net = tf.multiply(mask, output_1) + tf.multiply(1.0 - mask, output_2)