Installation and testing
This page guides you through installing the Tensor library and creating a skeleton project for experimentation.
The following system requirements must be met.
- System architecture: x86-64 (AMD64 or Intel 64)
- Operating system: Linux, MacOS or Microsoft Windows
- Microsoft .NET Standard 2.0 implementation
- For Linux
- The library
libgomp.so.1must be installed. (install on Ubuntu by running
sudo apt install libgomp1)
- The library
- For GPU acceleration (optional)
The library is delivered in two NuGet packages. The Tensor NuGet package provides the Tensor<'T> type and all core functions. Additional algorithms and data exchange methods are provided in the Tensor.Algorithm NuGet package.
The packages can be installed into your project by installing the
Tensor.Algorithm packages using the NuGet package manager (either via command line or graphical interface).
Skeleton project for .NET Core
In the course of this tutorial you will use the following skeleton project for experimentation. We assume that you are using .NET Core 2.0 on either Linux or Windows for the rest of the tutorial.
To create the skeleton project run the following commands.
$ mkdir tutorial $ cd tutorial $ dotnet new console -lang F#
Then, run the following commands to install the Tensor library into your project.
$ dotnet add package Tensor $ dotnet add package Tensor.Algorithm
Basic verificiation test
To verify that the installation was successful you can perform a basic test of the library.
Place the following code into
open Tensor [<EntryPoint>] let main argv = let x = HostTensor.counting 6L printfn "x = %A" x 0
If everything works fine,
dotnet run automatically builds your project and produces the following output.
$ dotnet run x = [ 0 1 2 3 4 5]
GPU acceleration verification test
Program.fs and executing
dotnet run, you can test if GPU acceleration works properly.
Source code and issues
The source code of the Tensor library is available at https://github.com/DeepMLNet/DeepNet.
You can also directly reference the
Tensor.Algorithm.fsproj projects inside the source tree from your project by using
dotnet add reference <path>.
This is useful if you want to modify the Tensor library itself or for debugging.