import tensorflow as tf

        return tf.nn.dropout(bottom, ratio, name=name)

    def _anchor_target_layer(self, rpn_cls_score, name):
        with tf.variable_scope(name):
            # 这里的index是对于所有anchor而言
            # (1, 1, A * height, width)
            # (1, height, width, A * 4)
            # (1, height, width, A * 4)
            # (1, height, width, A * 4)
            rpn_labels, rpn_bbox_targets, rpn_bbox_inside_weights, rpn_bbox_outside_weights = tf.py_func(
                anchor_target_layer,
                [rpn_cls_score, self._gt_boxes, self._im_info, self._feat_stride, self._anchors, self._num_anchors],
                [tf.float32, tf.float32, tf.float32, tf.float32])
            #self._gt_boxes = tf.placeholder(tf.float32, shape=[None, 5])     #gt_boxes缩放之后的坐标以及所属类别的标号
            
            rpn_labels.set_shape([1, 1, None, None])
            rpn_bbox_targets.set_shape([1, None, None, self._num_anchors * 4])
            rpn_bbox_inside_weights.set_shape([1, None, None, self._num_anchors * 4])
