Table Of Contents
Table Of Contents


mxnet.ndarray.SpatialTransformer(data=None, loc=None, target_shape=_Null, transform_type=_Null, sampler_type=_Null, out=None, name=None, **kwargs)

Applies a spatial transformer to input feature map.

  • data (NDArray) – Input data to the SpatialTransformerOp.
  • loc (NDArray) – localisation net, the output dim should be 6 when transform_type is affine. You shold initialize the weight and bias with identity tranform.
  • target_shape (Shape(tuple), optional, default=[0,0]) – output shape(h, w) of spatial transformer: (y, x)
  • transform_type ({'affine'}, required) – transformation type
  • sampler_type ({'bilinear'}, required) – sampling type
  • out (NDArray, optional) – The output NDArray to hold the result.

out – The output of this function.

Return type:

NDArray or list of NDArrays