Backends/SiaNet.Backend.Torch/TypeGeneration.cs
// NOTE: We need to determine the right marshalling for an array of handles.
/// <summary>
///   Concatenate tensors along the given dimesion.
/// </summary>
/// <param name="tensors">A collection of tensors..</param>
/// <param name="dimension">The dimension along which to concatenate.</param>
Concatenate tensors along the given dimesion.
Concatenate tensors along the given dimesion .
public static ShortTensor Concatenate (IEnumerable<ShortTensor> tensors, int dimension)
        {
            var result = new ShortTensor ();
            var handleArray = tensors.Select(t => t.handle).ToArray();
            THShortTensor_catArray (result.handle, handleArray, (int)handleArray.Length, dimension);
            return result;
        }
public static ShortTensor Concatenate ( IEnumerable < ShortTensor > tensors , int dimension ) { var result = new ShortTensor ( ) ; var handleArray = tensors . Select ( t => t . handle ) . ToArray ( ) ; THShortTensor_catArray ( result . handle , handleArray , ( int ) handleArray . Length , dimension ) ; return result ; }
Concatenate tensors along the given dimesion.
Concatenate tensors along the given dimesion .
tensors
IEnumerable<ShortTensor>
A collection of tensors
A collection of tensors
dimension
int
The dimension along which to concatenate.
The dimension along which to concatenate .