Performs a matrix multiplication of the matrices ``inp1`` and ``inp2``.
With different inputs dim, this function behaves differently:
defwarp_perspective(
inp:Tensor,
M:Tensor,
dsize:Union[Tuple[int,int],int,Tensor],
border_mode:str="REPLICATE",
border_val:float=0.0,
interp_mode:str="LINEAR",
)->Tensor:
r"""
Applies perspective transformation to batched 2D images.
- Both 1-D tensor, simply forward to ``dot``.
- Both 2-D tensor, normal matrix multiplication.
- If one input tensor is 1-D, matrix vector multiplication.
- If at least one tensor are 3-dimensional or >3-dimensional, the other tensor should have dim >= 2, the batched matrix-matrix is returned, and the tensor with smaller dimension will