diff --git a/src/TensorFlowNET.Core/APIs/tf.array.cs b/src/TensorFlowNET.Core/APIs/tf.array.cs index fbc01a8b..bd6f6101 100644 --- a/src/TensorFlowNET.Core/APIs/tf.array.cs +++ b/src/TensorFlowNET.Core/APIs/tf.array.cs @@ -94,6 +94,15 @@ namespace Tensorflow public Tensor fill(Tensor dims, T value, string name = null) => gen_array_ops.fill(dims, value, name: name); + /// + /// Return a tensor with the same shape and contents as input. + /// + /// + /// + /// + public static Tensor identity(Tensor input, string name = null) + => array_ops.identity(input, name: name); + /// /// Gather slices from params axis axis according to indices. /// diff --git a/src/TensorFlowNET.Core/APIs/tf.math.cs b/src/TensorFlowNET.Core/APIs/tf.math.cs index fd051daa..e62f6358 100644 --- a/src/TensorFlowNET.Core/APIs/tf.math.cs +++ b/src/TensorFlowNET.Core/APIs/tf.math.cs @@ -414,6 +414,17 @@ namespace Tensorflow public Tensor reduce_all(Tensor input_tensor, int[] axis = null, bool keepdims = false, string name = null) => math_ops.reduce_all(input_tensor, axis: axis, keepdims: keepdims, name: name); + /// + /// Computes the product of elements across dimensions of a tensor. + /// + /// + /// + /// + /// + /// + public Tensor reduce_prod(Tensor input_tensor, int[] axis = null, bool keepdims = false, string name = null) + => math_ops.reduce_prod(input_tensor, axis: axis, keepdims: keepdims, name: name); + /// /// Computes the sum of elements across dimensions of a tensor. /// diff --git a/src/TensorFlowNET.Core/APIs/tf.ops.cs b/src/TensorFlowNET.Core/APIs/tf.ops.cs index fe790826..d2ab44b2 100644 --- a/src/TensorFlowNET.Core/APIs/tf.ops.cs +++ b/src/TensorFlowNET.Core/APIs/tf.ops.cs @@ -14,10 +14,18 @@ limitations under the License. ******************************************************************************/ +using System.Collections.Generic; + namespace Tensorflow { public partial class tensorflow { + public void add_to_collection(string name, T value) + => get_default_graph().add_to_collection(name, value); + + public void add_to_collections(List names, T value) + => get_default_graph().add_to_collections(names, value); + public Tensor assign(Tensor @ref, object value, bool validate_shape = true, bool use_locking = true, string name = null) => state_ops.assign(@ref, value, validate_shape, use_locking, name);