using System; using System.Collections.Generic; using System.Text; namespace Tensorflow { public static partial class tf { /// /// Inserts a dimension of 1 into a tensor's shape. /// /// /// /// /// /// /// A `Tensor` with the same data as `input`, but its shape has an additional /// dimension of size 1 added. /// public static Tensor expand_dims(Tensor input, int axis = -1, string name = null, int dim = -1) => array_ops.expand_dims(input, axis, name, dim); /// /// Return the elements, either from `x` or `y`, depending on the `condition`. /// /// public static Tensor where(Tensor condition, Tx x, Ty y, string name = null) => array_ops.where(condition, x, y, name); /// /// Transposes `a`. Permutes the dimensions according to `perm`. /// /// /// /// /// /// public static Tensor transpose(T1 a, int[] perm = null, string name = "transpose", bool conjugate = false) => array_ops.transpose(a, perm, name, conjugate); public static Tensor squeeze(Tensor input, int[] axis = null, string name = null, int squeeze_dims = -1) => gen_array_ops.squeeze(input, axis, name); /// /// Stacks a list of rank-`R` tensors into one rank-`(R+1)` tensor. /// /// /// /// /// public static Tensor stack(object values, int axis = 0, string name = "stack") => array_ops.stack(values, axis, name: name); public static Tensor one_hot(Tensor indices, int depth, Tensor on_value = null, Tensor off_value = null, TF_DataType dtype = TF_DataType.DtInvalid, int axis = -1, string name = null) => array_ops.one_hot(indices, depth, dtype: dtype, axis: axis, name: name); /// /// A placeholder op that passes through `input` when its output is not fed. /// /// /// A `Tensor`. The default value to produce when output is not fed. /// /// A `tf.TensorShape` or list of `int`s. The (possibly partial) shape of /// the tensor. /// /// A name for the operation (optional). /// A `Tensor`. Has the same type as `input`. public static Tensor placeholder_with_default(T input, int[] shape, string name = null) => gen_array_ops.placeholder_with_default(input, shape, name: name); } }