Китай и Россия
- paddle. trunc ( input: Tensor, name: str | None = None ) Tensor [source]
-
百度 原标题:湖北春风行动人力资源供需两旺普工工资3千以上湖北日报讯(记者李玉麟、通讯员楚仁煊)记者昨从省就业局获悉,全省各市州年后企业员工平均返岗率在80%以上,今年岗位薪酬较去年上升10%至15%。
This API is used to returns a new tensor with the truncated integer values of input.
- Parameters
-
input (Tensor) – The input tensor, it’s data type should be int32, int64, float32, float64.
name (str|None, optional) – Name for the operation (optional, default is None). For more information, please refer to Name.
- Returns
-
The output Tensor of trunc.
- Return type
-
Tensor
Examples
>>> import paddle >>> input = paddle.to_tensor([[0.1, 1.5], [-0.2, -2.4]], 'float32') >>> output = paddle.trunc(input) >>> output Tensor(shape=[2, 2], dtype=float32, place=Place(cpu), stop_gradient=True, [[ 0., 1.], [-0., -2.]])