model

package
v0.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dataset

type Dataset struct {
	Git GitRepo `json:"git,omitempty" yaml:"git,omitempty"`
}

type Format

type Format string

Format is the definition of model format.

const (
	FormatSavedModel  Format = "SavedModel"
	FormatONNX        Format = "ONNX"
	FormatH5          Format = "H5"
	FormatPMML        Format = "PMML"
	FormatCaffeModel  Format = "CaffeModel"
	FormatNetDef      Format = "NetDef"
	FormatMXNETParams Format = "MXNETParams"
	FormatTorchScript Format = "TorchScript"
	FormatGraphDef    Format = "GraphDef"
	FormatTensorRT    Format = "TensorRT"
	FormatSKLearn     Format = "SKLearn"
	FormatXGBoost     Format = "XGBoost"
	FormatOthers      Format = "Others"
)

func (Format) ValidateDirectory

func (f Format) ValidateDirectory(rootPath string) error

type GitRepo

type GitRepo struct {
	Repository string `json:"repository,omitempty" yaml:"repository,omitempty"`
	Revision   string `json:"revision,omitempty" yaml:"revision,omitempty"`
}

type Hyperparameter

type Hyperparameter struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Hyperparameter is the type for training hyperparameter (e.g. learning rate).

type Interface

type Interface interface {
	ValidateDirectory(rootPath string) error
}

type Layer

type Layer struct {
	Name string `json:"name,omitempty" yaml:"name,omitempty"`
}

type Metadata

type Metadata struct {
	Author      string            `json:"author,omitempty" yaml:"author,omitempty"`
	Created     time.Time         `json:"created,omitempty" yaml:"created,omitempty"`
	Description string            `json:"description,omitempty" yaml:"description,omitempty"`
	Tags        []string          `json:"tags,omitempty" yaml:"tags,omitempty"`
	Labels      map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
	Format      string            `json:"format,omitempty" yaml:"format,omitempty"`
	// GPUType is for TensorRT format only, it must be set when extract signature or serve
	// as a online service, otherwise, it can not extract or serve as a service.
	// for other model format, you can set empty string or not set.
	GPUType            string           `json:"gpuType,omitempty" yaml:"gpuType,omitempty"`
	Framework          string           `json:"framework,omitempty" yaml:"framework,omitempty"`
	Metrics            []Metric         `json:"metrics,omitempty" yaml:"metrics,omitempty"`
	Hyperparameters    []Hyperparameter `json:"hyperparameters,omitempty" yaml:"hyperparameters,omitempty"`
	Signature          *Signature       `json:"signature,omitempty" yaml:"signature,omitempty"`
	Training           *Training        `json:"training,omitempty" yaml:"training,omitempty"`
	Dataset            *Dataset         `json:"dataset,omitempty" yaml:"dataset,omitempty"`
	DirectoryStructure []string         `json:"directoryStructure,omitempty" yaml:"directoryStructure,omitempty"`
}

type Metric

type Metric struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

Metric is the type for training metric (e.g. acc).

type Model

type Model struct {
	// Metadata is the contents of the Chartfile.
	Metadata *Metadata `json:"metadata,omitempty"`
	Path     string    `json:"path,omitempty"`
	Content  []byte    `json:"content,omitempty"`
	Config   []byte    `json:"config,omitempty"`
}

type Signature

type Signature struct {
	Inputs  []Tensor `json:"inputs,omitempty" yaml:"inputs,omitempty"`
	Outputs []Tensor `json:"outputs,omitempty" yaml:"outputs,omitempty"`
	Layers  []Layer  `json:"layers,omitempty" yaml:"layers,omitempty"`
}

type Tensor

type Tensor struct {
	Name  string `json:"name,omitempty" yaml:"name,omitempty"`
	Size  []int  `json:"size,omitempty" yaml:"size,omitempty"`
	DType string `json:"dtype,omitempty" yaml:"dtype,omitempty"`
	// OpType is special for PMML
	OpType string `json:"optype,omitempty" yaml:"optype,omitempty"`
	// Values is special for PMML
	Values []string `json:"values,omitempty" yaml:"values,omitempty"`
}

type Training

type Training struct {
	Git GitRepo `json:"git,omitempty" yaml:"git,omitempty"`
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL