网易考拉爱他美奶粉真伪存疑 回应:看真假到

paddle. inner ( x: Tensor, y: Tensor, name: str | None = None ) Tensor [source]
百度 2018年3月18日,农历二月二龙抬头的日子,在山东省惠民县一乡村泥娃娃会上,就有一男一女拿着假火化证明跪地乞讨,被人识破后,赶庙会的大爷大妈依然踊跃给钱,拦都拦不住。

Inner product of two input Tensor.

Ordinary inner product for 1-D Tensors, in higher dimensions a sum product over the last axes.

Parameters
  • x (Tensor) – An N-D Tensor or a Scalar Tensor. If its not a scalar Tensor, its last dimensions must match y’s.

  • y (Tensor) – An N-D Tensor or a Scalar Tensor. If its not a scalar Tensor, its last dimensions must match x’s.

  • name (str|None, optional) – Name for the operation (optional, default is None). For more information, please refer to Name.

Returns

The inner-product Tensor, the output shape is x.shape[:-1] + y.shape[:-1].

Return type

Tensor

Examples

>>> import paddle
>>> x = paddle.arange(1, 7).reshape((2, 3)).astype('float32')
>>> y = paddle.arange(1, 10).reshape((3, 3)).astype('float32')
>>> out = paddle.inner(x, y)
>>> print(out)
Tensor(shape=[2, 3], dtype=float32, place=Place(cpu), stop_gradient=True,
[[14. , 32. , 50. ],
 [32. , 77. , 122.]])