Documentation
¶
Index ¶
- Variables
- func CreateBwdBenchmarkArgsOption(os ...BwdBenchmarkArgsOptionFunc) *bwdBenchmarkArgsOptions
- func CreateFwdBenchmarkArgsOption(os ...FwdBenchmarkArgsOptionFunc) *fwdBenchmarkArgsOptions
- func GetBatchSize() int64
- func Register(s Layer)
- func RegisteredLayers() []string
- func SetBatchSize(size int64)
- type BwdBenchmarkArgsOptionFunc
- type ConvBwdType
- func (i ConvBwdType) IsAConvBwdType() bool
- func (i ConvBwdType) MarshalJSON() ([]byte, error)
- func (i ConvBwdType) MarshalText() ([]byte, error)
- func (i ConvBwdType) MarshalYAML() (interface{}, error)
- func (i *ConvBwdType) Scan(value interface{}) error
- func (i ConvBwdType) String() string
- func (i *ConvBwdType) UnmarshalJSON(data []byte) error
- func (i *ConvBwdType) UnmarshalText(text []byte) error
- func (i *ConvBwdType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i ConvBwdType) Value() (driver.Value, error)
- type ConvFwdType
- func (i ConvFwdType) IsAConvFwdType() bool
- func (i ConvFwdType) MarshalJSON() ([]byte, error)
- func (i ConvFwdType) MarshalText() ([]byte, error)
- func (i ConvFwdType) MarshalYAML() (interface{}, error)
- func (i *ConvFwdType) Scan(value interface{}) error
- func (i ConvFwdType) String() string
- func (i *ConvFwdType) UnmarshalJSON(data []byte) error
- func (i *ConvFwdType) UnmarshalText(text []byte) error
- func (i *ConvFwdType) UnmarshalYAML(unmarshal func(interface{}) error) error
- func (i ConvFwdType) Value() (driver.Value, error)
- type DataType
- type FlopsInformation
- type FwdBenchmarkArgsOptionFunc
- type Layer
- type LayerInformation
- type Layers
- type MemoryInformation
- type Shape
- type ShapeInformation
Constants ¶
This section is empty.
Variables ¶
var AllDataTypes = []DataType{ DataType{ Name: "Float32", CType: "float", }, }
var BwdBenchmarkArgsOption = bwdBenchmarkArgsOptionHandler{ ConvBwdType: func(convBWDType ConvBwdType) BwdBenchmarkArgsOptionFunc { return func(o *bwdBenchmarkArgsOptions) { o.ConvBwdType = convBWDType } }, }
var FwdBenchmarkArgsOption = fwdBenchmarkArgsOptionHandler{ IsTraining: func(isTraining bool) FwdBenchmarkArgsOptionFunc { return func(o *fwdBenchmarkArgsOptions) { o.IsTraining = isTraining } }, ConvFwdType: func(convFWDType ConvFwdType) FwdBenchmarkArgsOptionFunc { return func(o *fwdBenchmarkArgsOptions) { o.ConvFwdType = convFWDType } }, }
Functions ¶
func CreateBwdBenchmarkArgsOption ¶
func CreateBwdBenchmarkArgsOption(os ...BwdBenchmarkArgsOptionFunc) *bwdBenchmarkArgsOptions
func CreateFwdBenchmarkArgsOption ¶
func CreateFwdBenchmarkArgsOption(os ...FwdBenchmarkArgsOptionFunc) *fwdBenchmarkArgsOptions
func GetBatchSize ¶
func GetBatchSize() int64
func RegisteredLayers ¶
func RegisteredLayers() []string
func SetBatchSize ¶
func SetBatchSize(size int64)
Types ¶
type BwdBenchmarkArgsOptionFunc ¶
type BwdBenchmarkArgsOptionFunc func(*bwdBenchmarkArgsOptions)
type ConvBwdType ¶
type ConvBwdType int
const ( ConvBwdTypeUndefined ConvBwdType = 0 ConvBwdTypeData ConvBwdType = 1 ConvBwdTypeFilter ConvBwdType = 2 ConvBwdTypeBias ConvBwdType = 3 )
func ConvBwdTypeString ¶
func ConvBwdTypeString(s string) (ConvBwdType, error)
ConvBwdTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ConvBwdTypeValues ¶
func ConvBwdTypeValues() []ConvBwdType
ConvBwdTypeValues returns all values of the enum
func (ConvBwdType) IsAConvBwdType ¶
func (i ConvBwdType) IsAConvBwdType() bool
IsAConvBwdType returns "true" if the value is listed in the enum definition. "false" otherwise
func (ConvBwdType) MarshalJSON ¶
func (i ConvBwdType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for ConvBwdType
func (ConvBwdType) MarshalText ¶
func (i ConvBwdType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ConvBwdType
func (ConvBwdType) MarshalYAML ¶
func (i ConvBwdType) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for ConvBwdType
func (*ConvBwdType) Scan ¶
func (i *ConvBwdType) Scan(value interface{}) error
func (ConvBwdType) String ¶
func (i ConvBwdType) String() string
func (*ConvBwdType) UnmarshalJSON ¶
func (i *ConvBwdType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for ConvBwdType
func (*ConvBwdType) UnmarshalText ¶
func (i *ConvBwdType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ConvBwdType
func (*ConvBwdType) UnmarshalYAML ¶
func (i *ConvBwdType) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for ConvBwdType
type ConvFwdType ¶
type ConvFwdType int
const ( ConvFwdTypeUndefined ConvFwdType = 0 ConvFwdTypeConv ConvFwdType = 1 ConvFwdTypeBias ConvFwdType = 2 ConvFwdTypeConvFusedActivation ConvFwdType = 3 )
func ConvFwdTypeString ¶
func ConvFwdTypeString(s string) (ConvFwdType, error)
ConvFwdTypeString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.
func ConvFwdTypeValues ¶
func ConvFwdTypeValues() []ConvFwdType
ConvFwdTypeValues returns all values of the enum
func (ConvFwdType) IsAConvFwdType ¶
func (i ConvFwdType) IsAConvFwdType() bool
IsAConvFwdType returns "true" if the value is listed in the enum definition. "false" otherwise
func (ConvFwdType) MarshalJSON ¶
func (i ConvFwdType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface for ConvFwdType
func (ConvFwdType) MarshalText ¶
func (i ConvFwdType) MarshalText() ([]byte, error)
MarshalText implements the encoding.TextMarshaler interface for ConvFwdType
func (ConvFwdType) MarshalYAML ¶
func (i ConvFwdType) MarshalYAML() (interface{}, error)
MarshalYAML implements a YAML Marshaler for ConvFwdType
func (*ConvFwdType) Scan ¶
func (i *ConvFwdType) Scan(value interface{}) error
func (ConvFwdType) String ¶
func (i ConvFwdType) String() string
func (*ConvFwdType) UnmarshalJSON ¶
func (i *ConvFwdType) UnmarshalJSON(data []byte) error
UnmarshalJSON implements the json.Unmarshaler interface for ConvFwdType
func (*ConvFwdType) UnmarshalText ¶
func (i *ConvFwdType) UnmarshalText(text []byte) error
UnmarshalText implements the encoding.TextUnmarshaler interface for ConvFwdType
func (*ConvFwdType) UnmarshalYAML ¶
func (i *ConvFwdType) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML implements a YAML Unmarshaler for ConvFwdType
type FlopsInformation ¶
type FlopsInformation struct {
MultiplyAdds int64 `json:"multiply_adds"`
Additions int64 `json:"additions"`
Divisions int64 `json:"divisions"`
Exponentiations int64 `json:"exponentiations"`
Comparisons int64 `json:"comparisons"`
General int64 `json:"general"`
}
func (FlopsInformation) Add ¶
func (this FlopsInformation) Add(other FlopsInformation) FlopsInformation
func (FlopsInformation) Header ¶
func (FlopsInformation) Header() []string
func (FlopsInformation) Row ¶
func (this FlopsInformation) Row(humanFlops bool) []string
func (FlopsInformation) Total ¶
func (this FlopsInformation) Total() int64
type FwdBenchmarkArgsOptionFunc ¶
type FwdBenchmarkArgsOptionFunc func(*fwdBenchmarkArgsOptions)
type Layer ¶
type Layer interface {
Name() string
ShortName() string
Node() *onnx.NodeProto
WeightTensors() []*onnx.TensorProto
OperatorType() string
InferShape(Layers)
Inputs() Layers
SetInputs(Layers)
Outputs() Layers
SetOutputs(Layers)
InputShapes() []Shape
SetInputShapes([]Shape)
OutputShapes() []Shape
Information() LayerInformation
DataTypes() []DataType
FwdBenchmarkName(...FwdBenchmarkArgsOptionFunc) string
FwdBenchmarkFilter(string, string, ...FwdBenchmarkArgsOptionFunc) benchmark.Benchmark
FwdBenchmarkArgs(...FwdBenchmarkArgsOptionFunc) interface{}
FwdBenchmarkGeneratorArgNames() []string
FwdBenchmarkAlgorithms(...FwdBenchmarkArgsOptionFunc) []string
BwdBenchmarkName(...BwdBenchmarkArgsOptionFunc) string
BwdBenchmarkFilter(string, string, ...BwdBenchmarkArgsOptionFunc) benchmark.Benchmark
BwdBenchmarkArgs(...BwdBenchmarkArgsOptionFunc) interface{}
BwdBenchmarkGeneratorArgNames() []string
BwdBenchmarkAlgorithms(...BwdBenchmarkArgsOptionFunc) []string
}
type LayerInformation ¶
type LayerInformation interface {
Name() string
OperatorType() string
InputNames() []string
OutputNames() []string
Weigths() []float32
Shape() ShapeInformation
Flops() FlopsInformation
Memory() MemoryInformation
}
type MemoryInformation ¶
type MemoryInformation struct {
Weights int64 `json:"weights,omitempty"`
Activation int64 `json:"activation,omitempty"`
}
func (MemoryInformation) Add ¶
func (this MemoryInformation) Add(other MemoryInformation) MemoryInformation
type ShapeInformation ¶
type ShapeInformation struct {
InputShapes []Shape `json:"input_shapes,omitempty"`
OutputShapes []Shape `json:"output_shapes,omitempty"`
}
func (ShapeInformation) Header ¶
func (ShapeInformation) Header() []string
func (ShapeInformation) Row ¶
func (this ShapeInformation) Row() []string