Categorygithub.com/pfnet-research/go-menoh
modulepackage
0.2.0
Repository: https://github.com/pfnet-research/go-menoh.git
Documentation: pkg.go.dev

# README

Menoh Go

Build Status Build status codecov GoDoc Go Report Card

Golang binding for Menoh

Requirements

Install

After install Menoh, then

$ go get -u github.com/pfnet-research/go-menoh

Linux/Mac

Add a path to library to LD_LIBRARY_PATH environment variable. Menoh libraries are installed to /usr/local/lib on default.

$ export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Windows

Add a path to DLLs distributed by Menoh to local Path environment.

\path\to\menoh\bin
  |- libiomp5md.dll
  |- menoh.dll
  |- mkldnn.dll
  |- mklml.dll
set PATH=\path\to\menoh\bin;%PATH%

Usage

Development

Test

Download ONNX file, using in menoh-rust test, before testing.

$ wget https://github.com/pfnet-research/menoh-rs/releases/download/assets/MLP.onnx -P test_data
$ go test ./...

Additionally go-menoh follows gofmt with simplify option (-s), go vet and golint.

Note

License

MIT License (see LICENSE file).

# Packages

No description provided by the author
No description provided by the author
No description provided by the author

# Functions

NewModelDataFromBytes return ModelData from binary data.
NewModelDataFromPath returns ModelData using ONNX file placed on the path.
NewRawModelData return empty ModelData to be setup outer.
NewRunner returns Runner using configuration, the runner setup Menoh model and ready for execution.
NewRunnerWithModelData returns Runner using configuration and ONNX model.

# Constants

TypeFloat is a TypeDtype of Float.
TypeMKLDNN is a TypeBackend of MKL-DNN.

# Structs

Config is setup information to build Menoh model.
FloatTensor represents float32 Tessor.
InputConfig is input variable information to pass to the model.
ModelData is a wrap of menoh.ModelData.
OutputConfig is output variable information to get from the model.
Runner setups Menoh model with profiling and executes with input variables.

# Interfaces

Tensor is base unit of matrix data to pass Menoh model.

# Type aliases

TypeBackend is a type of backend, like MKL-DNN.
TypeDtype is a type of data.