| @@ -105,6 +105,39 @@ namespace Tensorflow | |||||
| public static Tensor greater_equal<Tx, Ty>(Tx x, Ty y, string name = null) | public static Tensor greater_equal<Tx, Ty>(Tx x, Ty y, string name = null) | ||||
| => gen_math_ops.greater_equal(x, y, name); | => gen_math_ops.greater_equal(x, y, name); | ||||
| /// <summary> | |||||
| /// Returns the truth value of (x < y) element-wise. | |||||
| /// </summary> | |||||
| /// <typeparam name="Tx"></typeparam> | |||||
| /// <typeparam name="Ty"></typeparam> | |||||
| /// <param name="x"></param> | |||||
| /// <param name="y"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor less<Tx, Ty>(Tx x, Ty y, string name = null) | |||||
| => gen_math_ops.less(x, y, name); | |||||
| /// <summary> | |||||
| /// Returns the truth value of (x <= y) element-wise. | |||||
| /// </summary> | |||||
| /// <typeparam name="Tx"></typeparam> | |||||
| /// <typeparam name="Ty"></typeparam> | |||||
| /// <param name="x"></param> | |||||
| /// <param name="y"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor less_equal<Tx, Ty>(Tx x, Ty y, string name = null) | |||||
| => gen_math_ops.less_equal(x, y, name); | |||||
| /// <summary> | |||||
| /// Computes natural logarithm of (1 + x) element-wise. | |||||
| /// </summary> | |||||
| /// <param name="x"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor log1p(Tensor x, string name = null) | |||||
| => gen_math_ops.log1p(x, name); | |||||
| /// <summary> | /// <summary> | ||||
| /// Clips tensor values to a specified min and max. | /// Clips tensor values to a specified min and max. | ||||
| /// </summary> | /// </summary> | ||||
| @@ -141,6 +174,56 @@ namespace Tensorflow | |||||
| public static Tensor atan2(Tensor y, Tensor x, string name = null) | public static Tensor atan2(Tensor y, Tensor x, string name = null) | ||||
| => gen_math_ops.atan2(y, x, name); | => gen_math_ops.atan2(y, x, name); | ||||
| /// <summary> | |||||
| /// Computes the maximum of elements across dimensions of a tensor. | |||||
| /// </summary> | |||||
| /// <typeparam name="Tx"></typeparam> | |||||
| /// <typeparam name="Ty"></typeparam> | |||||
| /// <param name="input"></param> | |||||
| /// <param name="axis"></param> | |||||
| /// <param name="keep_dims"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor max<Tx, Ty>(Tx input, Ty axis, bool keep_dims = false, string name = null) | |||||
| => gen_math_ops._max(input, axis, keep_dims: keep_dims, name: name); | |||||
| /// <summary> | |||||
| /// Computes the minimum of elements across dimensions of a tensor. | |||||
| /// </summary> | |||||
| /// <typeparam name="Tx"></typeparam> | |||||
| /// <typeparam name="Ty"></typeparam> | |||||
| /// <param name="input"></param> | |||||
| /// <param name="axis"></param> | |||||
| /// <param name="keep_dims"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor min<Tx, Ty>(Tx input, Ty axis, bool keep_dims = false, string name = null) | |||||
| => gen_math_ops._min(input, axis, keep_dims: keep_dims, name: name); | |||||
| /// <summary> | |||||
| /// Returns the max of x and y (i.e. x > y ? x : y) element-wise. | |||||
| /// </summary> | |||||
| /// <typeparam name="T1"></typeparam> | |||||
| /// <typeparam name="T2"></typeparam> | |||||
| /// <param name="x"></param> | |||||
| /// <param name="y"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor maximum<T1, T2>(T1 x, T2 y, string name = null) | |||||
| => gen_math_ops.maximum(x, y, name: name); | |||||
| /// <summary> | |||||
| /// Returns the min of x and y (i.e. x < y ? x : y) element-wise. | |||||
| /// </summary> | |||||
| /// <typeparam name="T1"></typeparam> | |||||
| /// <typeparam name="T2"></typeparam> | |||||
| /// <param name="x"></param> | |||||
| /// <param name="y"></param> | |||||
| /// <param name="name"></param> | |||||
| /// <returns></returns> | |||||
| public static Tensor minimum<T1, T2>(T1 x, T2 y, string name = null) | |||||
| => gen_math_ops.minimum(x, y, name: name); | |||||
| public static Tensor multiply(Tensor x, Tensor y) | public static Tensor multiply(Tensor x, Tensor y) | ||||
| => gen_math_ops.mul(x, y); | => gen_math_ops.mul(x, y); | ||||
| @@ -26,13 +26,6 @@ namespace Tensorflow | |||||
| return _op.outputs[0]; | return _op.outputs[0]; | ||||
| } | } | ||||
| public static Tensor less<Tx, Ty>(Tx x, Ty y, string name = null) | |||||
| { | |||||
| var _op = _op_def_lib._apply_op_helper("Less", name: name, args: new { x, y }); | |||||
| return _op.outputs[0]; | |||||
| } | |||||
| public static Tensor pack(Tensor[] values, int axis = 0, string name = null) | public static Tensor pack(Tensor[] values, int axis = 0, string name = null) | ||||
| { | { | ||||
| var _op = _op_def_lib._apply_op_helper("Pack", name: name, args: new { values, axis }); | var _op = _op_def_lib._apply_op_helper("Pack", name: name, args: new { values, axis }); | ||||
| @@ -135,6 +135,27 @@ namespace Tensorflow | |||||
| return _op.outputs[0]; | return _op.outputs[0]; | ||||
| } | } | ||||
| public static Tensor less<Tx, Ty>(Tx x, Ty y, string name = null) | |||||
| { | |||||
| var _op = _op_def_lib._apply_op_helper("Less", name: name, args: new { x, y }); | |||||
| return _op.outputs[0]; | |||||
| } | |||||
| public static Tensor less_equal<Tx, Ty>(Tx x, Ty y, string name = null) | |||||
| { | |||||
| var _op = _op_def_lib._apply_op_helper("LessEqual", name: name, args: new { x, y }); | |||||
| return _op.outputs[0]; | |||||
| } | |||||
| public static Tensor log1p(Tensor x, string name = null) | |||||
| { | |||||
| var _op = _op_def_lib._apply_op_helper("Log1p", name, args: new { x }); | |||||
| return _op.outputs[0]; | |||||
| } | |||||
| public static Tensor squared_difference(Tensor x, Tensor y, string name = null) | public static Tensor squared_difference(Tensor x, Tensor y, string name = null) | ||||
| { | { | ||||
| var _op = _op_def_lib._apply_op_helper("SquaredDifference", name, args: new { x, y, name }); | var _op = _op_def_lib._apply_op_helper("SquaredDifference", name, args: new { x, y, name }); | ||||
| @@ -308,6 +329,13 @@ namespace Tensorflow | |||||
| return _op.outputs[0]; | return _op.outputs[0]; | ||||
| } | } | ||||
| public static Tensor minimum<T1, T2>(T1 x, T2 y, string name = null) | |||||
| { | |||||
| var _op = _op_def_lib._apply_op_helper("Minimum", name, args: new { x, y }); | |||||
| return _op.outputs[0]; | |||||
| } | |||||
| public static Tensor _abs(Tensor x, string name = null) | public static Tensor _abs(Tensor x, string name = null) | ||||
| { | { | ||||
| var _op = _op_def_lib._apply_op_helper("Abs", name, new { x }); | var _op = _op_def_lib._apply_op_helper("Abs", name, new { x }); | ||||
| @@ -322,6 +350,13 @@ namespace Tensorflow | |||||
| return _op.outputs[0]; | return _op.outputs[0]; | ||||
| } | } | ||||
| public static Tensor _min<Tx, Ty>(Tx input, Ty axis, bool keep_dims = false, string name = null) | |||||
| { | |||||
| var _op = _op_def_lib._apply_op_helper("Min", name, new { input, reduction_indices = axis, keep_dims }); | |||||
| return _op.outputs[0]; | |||||
| } | |||||
| public static Tensor pow<Tx, Ty>(Tx x, Ty y, string name = null) | public static Tensor pow<Tx, Ty>(Tx x, Ty y, string name = null) | ||||
| { | { | ||||
| var _op = _op_def_lib._apply_op_helper("Pow", name, args: new { x, y }); | var _op = _op_def_lib._apply_op_helper("Pow", name, args: new { x, y }); | ||||
| @@ -27,12 +27,12 @@ namespace Tensorflow | |||||
| public static Tensor operator %(Tensor x, Tensor y) => BinaryOpWrapper("mod", x, y); | public static Tensor operator %(Tensor x, Tensor y) => BinaryOpWrapper("mod", x, y); | ||||
| public static Tensor operator >(Tensor x, int y) => gen_array_ops.greater(x, y); | |||||
| public static Tensor operator >(Tensor x, float y) => gen_array_ops.greater(x, y); | |||||
| public static Tensor operator >(Tensor x, double y) => gen_array_ops.greater(x, y); | |||||
| public static Tensor operator <(Tensor x, int y) => gen_array_ops.less(x, y); | |||||
| public static Tensor operator <(Tensor x, float y) => gen_array_ops.less(x, y); | |||||
| public static Tensor operator <(Tensor x, double y) => gen_array_ops.less(x, y); | |||||
| public static Tensor operator >(Tensor x, int y) => gen_math_ops.greater(x, y); | |||||
| public static Tensor operator >(Tensor x, float y) => gen_math_ops.greater(x, y); | |||||
| public static Tensor operator >(Tensor x, double y) => gen_math_ops.greater(x, y); | |||||
| public static Tensor operator <(Tensor x, int y) => gen_math_ops.less(x, y); | |||||
| public static Tensor operator <(Tensor x, float y) => gen_math_ops.less(x, y); | |||||
| public static Tensor operator <(Tensor x, double y) => gen_math_ops.less(x, y); | |||||
| private static Tensor BinaryOpWrapper<Tx, Ty>(string name, Tx x, Ty y) | private static Tensor BinaryOpWrapper<Tx, Ty>(string name, Tx x, Ty y) | ||||
| { | { | ||||