Tensor.NET 0.1.2

dotnet add package Tensor.NET --version 0.1.2                
NuGet\Install-Package Tensor.NET -Version 0.1.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Tensor.NET" Version="0.1.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tensor.NET --version 0.1.2                
#r "nuget: Tensor.NET, 0.1.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Tensor.NET as a Cake Addin
#addin nuget:?package=Tensor.NET&version=0.1.2

// Install Tensor.NET as a Cake Tool
#tool nuget:?package=Tensor.NET&version=0.1.2                

Tensor.NET

Tensor.NET is a lightweight and high-performance tensor library which provides numpy-like operations but .NET style interfaces. It supports generic tensor, Linq, C# native slices and so on. It is young so that it may may lack some features or have some BUGs. Please tell us on github or via email, thank you!

Update information in this version

  1. Add static method for load and save.
  2. Add mod, and, or, xor operators for Tensor.
  3. Add ForEach method for Tensor.
  4. Add docs for public APIs.

Why using Tensor.NET

Currently, there has been some repositories to support tensor operation, providing numpy-like interfaces, such as NumSharp and TensorFlow.NET. I also learned a lot from them and thanks for the authors of the two repositories sincerely!

However, everyone has his strong and weak points, compared with the previous works, Tensor.NET provides the features below.

  • Faster speed: using c++ to implement operations.

    Tensor.NET puts its implmentation of operations in c++ and interop with native api. Then a encapsulation is applied to hide the interop from users. It could provide better performance than pure C# implementation.

  • Better extensibility: using generic class Tensor<T>.

    Erasing type in the class design could provide convinience for python-style interfaces. However, using generic class could better integrate with other .NET code.

  • More friendly apis for .NETer

    Rather than providing python-style and numpy-like apis, Tensor.NET aims to design .NET style apis. It implements IEnumerable<T> interface, supports C# index and slice, and use generic to constriant the operations between tensors of different data types. Tensor.NET provides the main features in Numpy, but provides .NET style interfaces.

The following features will be provided in the future.

  • Optimize the algorithm of operations on x86.

  • Support multi-thread to accelerate the operations.

  • Support reading and writing tensor from image, excel, csv and other more formats.

Documention

Currently, most of the docs are in the making. Please wait for some days, thank you.

The major shortcoming

Despite the advantages above, Tensor.NET does have some shortcomings, the main shortcoming is its basic arithment with operator + - % /.

Since Tensor.NET use generic class in its design and operations between tensors of different types are supposed, there's no way to provide these operators in .NET 6 and C# 10 except the operations between tensors of the same data type. For tensors with different data types, Add, Sub, Mod, Div methods are provided. However, still, there will be some inconvinience.

This problem is supposed to be solved in .NET 7 with its new features. Thanks for the using and waiting!

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net6.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.1.2 780 5/24/2022
0.1.0 432 5/19/2022