def _roi_pool_shape(op):
  """Shape function for the RoiPool op.

  """
  dims_data = op.inputs[0].get_shape().as_list()
  channels = dims_data[3]
  dims_rois = op.inputs[1].get_shape().as_list()
  num_rois = dims_rois[0]

  pooled_height = op.get_attr('pooled_height')
  pooled_width = op.get_attr('pooled_width')

  output_shape = tf.TensorShape([num_rois, pooled_height, pooled_width, channels])
  return [output_shape, output_shape]
Shape function for the RoiPool op.

  
lib/roi_pooling_layer/roi_pooling_op_grad.py