Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build_whole_network中的代码请教 #18

Open
guoguangchao opened this issue Dec 7, 2018 · 0 comments
Open

build_whole_network中的代码请教 #18

guoguangchao opened this issue Dec 7, 2018 · 0 comments

Comments

@guoguangchao
Copy link

        with tf.control_dependencies([rpn_labels]):
            with tf.variable_scope('sample_RCNN_minibatch'):
                rois, labels, bbox_targets = \
                tf.py_func(proposal_target_layer,
                           [rois, gtboxes_batch],
                           [tf.float32, tf.float32, tf.float32])
                rois = tf.reshape(rois, [-1, 4])
                labels = tf.to_int32(labels)
                labels = tf.reshape(labels, [-1])
                bbox_targets = tf.reshape(bbox_targets, [-1, 4*(cfgs.CLASS_NUM+1)])
                self.add_roi_batch_img_smry(input_img_batch, rois, labels)

请问在404行的代码中为什么要使用 with tf.control_dependencies([rpn_labels])?我看proposal_target_layer中没有依赖rpn_labels,为什么需要执行完rpn_labels,再计算proposal_target_layer。还有tensorflow是顺序执行的,为什么这里要加上control_dependencies控制呢?谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant