Wednesday, 15 May 2019

What happens if tf.stop_gradient is not set?

I am reading the faster-rcnn code of tensorflow models. I am confused with the use of tf.stop_gradient.

Consider the following code snippet:

if self._is_training:
    proposal_boxes = tf.stop_gradient(proposal_boxes)
    if not self._hard_example_miner:
    (groundtruth_boxlists, groundtruth_classes_with_background_list, _,
     groundtruth_weights_list
    ) = self._format_groundtruth_data(true_image_shapes)
    (proposal_boxes, proposal_scores,
     num_proposals) = self._sample_box_classifier_batch(
         proposal_boxes, proposal_scores, num_proposals,
         groundtruth_boxlists, groundtruth_classes_with_background_list,
         groundtruth_weights_list)

More code is here. My question is: what happens if tf.stop_gradient is not set for proposal_boxes?



from What happens if tf.stop_gradient is not set?

No comments:

Post a Comment