| @@ -287,6 +287,9 @@ namespace Tensorflow | |||||
| public static Tensor reduce_mean(Tensor input_tensor, int[] axis = null, bool keepdims = false, string name = null, int? reduction_indices = null) | public static Tensor reduce_mean(Tensor input_tensor, int[] axis = null, bool keepdims = false, string name = null, int? reduction_indices = null) | ||||
| => math_ops.reduce_mean(input_tensor, axis: axis, keepdims: keepdims, name: name, reduction_indices: reduction_indices); | => math_ops.reduce_mean(input_tensor, axis: axis, keepdims: keepdims, name: name, reduction_indices: reduction_indices); | ||||
| public static Tensor round(Tensor x, string name = null) | |||||
| => gen_math_ops.round(x, name: name); | |||||
| public static Tensor cast(Tensor x, TF_DataType dtype = TF_DataType.DtInvalid, string name = null) | public static Tensor cast(Tensor x, TF_DataType dtype = TF_DataType.DtInvalid, string name = null) | ||||
| => math_ops.cast(x, dtype, name); | => math_ops.cast(x, dtype, name); | ||||
| @@ -429,6 +429,28 @@ namespace Tensorflow | |||||
| return _op.outputs[0]; | return _op.outputs[0]; | ||||
| } | } | ||||
| /// <summary> | |||||
| /// Rounds the values of a tensor to the nearest integer, element-wise. | |||||
| /// </summary> | |||||
| /// <param name="x"> | |||||
| /// </param> | |||||
| /// <param name="name"> | |||||
| /// If specified, the created operation in the graph will be this one, otherwise it will be named 'Round'. | |||||
| /// </param> | |||||
| /// <returns> | |||||
| /// The Operation can be fetched from the resulting Tensor, by fetching the Operation property from the result. | |||||
| /// </returns> | |||||
| /// <remarks> | |||||
| /// Rounds half to even. Also known as bankers rounding. If you want to round | |||||
| /// according to the current system rounding mode use std::cint. | |||||
| /// </remarks> | |||||
| public static Tensor round(Tensor x, string name = "Round") | |||||
| { | |||||
| var op = _op_def_lib._apply_op_helper("Round", name: name, new { x }); | |||||
| return op.output; | |||||
| } | |||||
| /// <summary> | /// <summary> | ||||
| /// Computes reciprocal of square root of x element-wise. | /// Computes reciprocal of square root of x element-wise. | ||||
| /// </summary> | /// </summary> | ||||