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 ByteTensor Concatenate (IEnumerable<ByteTensor> tensors, int dimension)
        {
            var result = new ByteTensor ();
            var handleArray = tensors.Select(t => t.handle).ToArray();
            THByteTensor_catArray (result.handle, handleArray, (int)handleArray.Length, dimension);
            return result;
        }
public static ByteTensor Concatenate ( IEnumerable < ByteTensor > tensors , int dimension ) { var result = new ByteTensor ( ) ; var handleArray = tensors . Select ( t => t . handle ) . ToArray ( ) ; THByteTensor_catArray ( result . handle , handleArray , ( int ) handleArray . Length , dimension ) ; return result ; }
Concatenate tensors along the given dimesion.
Concatenate tensors along the given dimesion .
tensors
IEnumerable<ByteTensor>
A collection of tensors
A collection of tensors
dimension
int
The dimension along which to concatenate.
The dimension along which to concatenate .