templates = self.get_image_embedding(exemplar_images)
center_scale = int(get_center(track_config['num_scales']))
center_template = tf.identity(templates[center_scale])
templates = tf.stack([center_template for _ in range(track_config['num_scales'])])
with tf.variable_scope('target_template'):
# Store template in Variable such that we don't have to feed this template every time.
with tf.variable_scope('State'):
state = tf.get_variable('exemplar',
initializer=tf.zeros(templates.get_shape().as_list(), dtype=templates.dtype),
trainable=False)
with tf.control_dependencies([templates]):
self.init = tf.assign(state, templates, validate_shape=True)
self.templates = state
这是测试的一段代码.构造测试的template,我想问下这段代码的具体执行流程,非常感谢,因为我想修改代码,但是这一段测试代码没弄明白.感谢回复