CropAndResizeGradImage


tensorflow C++ API

tensorflow::ops::CropAndResizeGradImage

Computes the gradient of the crop_and_resize op wrt the input image tensor.


Summary

Arguments:

  • scope: A Scope object
  • grads: A 4-D tensor of shape [num_boxes, crop_height, crop_width, depth].
  • boxes: A 2-D tensor of shape[num_boxes, 4]. Thei-th row of the tensor specifies the coordinates of a box in the box_ind[i]image and is specified in normalized coordinates[y1, x1, y2, x2]. A normalized coordinate value of yis mapped to the image coordinate aty * (image_height - 1), so as the[0, 1]interval of normalized image height is mapped to[0, image_height - 1]in image height coordinates. We do allowy1>y2, in which case the sampled crop is an up-down flipped version of the original image. The width dimension is treated similarly. Normalized coordinates outside the [0, 1]range are allowed.
  • box_ind: A 1-D tensor of shap[num_boxes]with int32 values in[0, batch). The value ofbox_ind[i]specifies the image that thei-th box refers to.crop_size: A 1-D tensor of 2 elements,size = [crop_height, crop_width].All cropped image patches are resized to this size. The aspect ratio of the image content is not preserved. Bothcrop_heightandcrop_widthneed to be positive.
  • image_size: A 1-D tensor with value [batch, image_height, image_width, depth] containing the original image size. Both image_height and image_width need to be positive.

Optional attributes (seeAttrs):

  • method: A string specifying the interpolation method. Only 'bilinear' is supported for now.

Returns:

  • Output: A 4-D tensor of shape [batch, image_height, image_width, depth].

Constructor

  • CropAndResizeGradImage(const ::tensorflow::Scope & scope, ::tensorflow::Input grads, ::tensorflow::Input boxes, ::tensorflow::Input box_ind, ::tensorflow::Input image_size, DataType T, const CropAndResizeGradImage::Attrs & attrs) .

Public attributes

  • tensorflow::Output output.

CropAndResizeGradImage block

Source link : https://github.com/EXPNUNI/enuSpaceTensorflow/blob/master/enuSpaceTensorflow/tf_image_ops.cpp

Argument:

  • Scope scope : A Scope object (A scope is generated automatically each page. A scope is not connected.)
  • grads : connect Input node.
  • boxes : connect Input node or input float value.
  • box_ind : connect Input node or input int32 value.
  • image_size : connect Input node or input int32 value.
  • CropAndResizeGradImage::Attrs attrs : input attrs. ex) method_ = "bilinear";

Return:

  • Output output: Output object of CropAndResizeGradImage object.

Result:

  • std::vector(Tensor) product_result : Returned object of executed result by calling session.

Using Method

results matching ""

    No results matching ""