Backends/SiaNet.Backend.Torch/TypeGeneration.cs
/// <summary>
///   Returns a new Tensor which indexes the original Tensor along dimension dim
///   using the entries in index.  The returned Tensor has the same number of dimensions as the
///   original Tensor. The returned Tensor does not use the same storage as the original Tensor.
/// </summary>
/// <param name="dim">Dimension to select</param>
/// <param name="index">Entries to extract</param>
Returns a new Tensor which indexes the original Tensor along dimension dim
using the entries in index.  The returned Tensor has the same number of dimensions as the
original Tensor. The returned Tensor does not use the same storage as the original Tensor.
Returns a new Tensor which indexes the original Tensor along dimension dim using the entries in index . The returned Tensor has the same number of dimensions as the original Tensor . The returned Tensor does not use the same storage as the original Tensor .
public FloatTensor IndexSelect (int dim, LongTensor index)
        {
            if (index == null)
                throw new ArgumentNullException (nameof (index));
            var res = new FloatTensor ();
            THFloatTensor_indexSelect (res.handle, handle, dim, index.handle);
            return res;
        }
public FloatTensor IndexSelect ( int dim , LongTensor index ) { if ( index == null ) throw new ArgumentNullException ( nameof ( index ) ) ; var res = new FloatTensor ( ) ; THFloatTensor_indexSelect ( res . handle , handle , dim , index . handle ) ; return res ; }
Returns a new Tensor which indexes the original Tensor along dimension dim
using the entries in index.
Returns a new Tensor which indexes the original Tensor along dimension dim using the entries in index .
dim
int
Dimension to select
Dimension to select
index
LongTensor
Entries to extract
Entries to extract