c2g

package
v0.0.0-...-64cb8c3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2018 License: BSD-2-Clause Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupConvolution

func SetupConvolution(layer LayerParameter) *layers.ConvolutionLayer

SetupConvolution setups ConvolutionLayer from caffe model.

func SetupDropout

func SetupDropout(layer LayerParameter) *layers.DropoutLayer

SetupDropout setups DropoutLayer from caffe model.

func SetupFullconnect

func SetupFullconnect(layer LayerParameter) (*layers.FullconnectLayer, error)

SetupFullconnect setups FullConnectLayer.

func SetupLRN

func SetupLRN(layer LayerParameter) *layers.LRN

SetupLRN setups LRNLayer from caffe model.

func SetupPooling

func SetupPooling(layer LayerParameter) *layers.PoolingLayer

SetupPooling setups PoolingLayer from caffe model.

func SetupReLU

func SetupReLU(layer LayerParameter) *layers.ReLULayer

SetupReLU setups ReLULayer from caffe model.

func SetupSoftmaxLoss

func SetupSoftmaxLoss(layer LayerParameter) *layers.SoftmaxLossLayer

SetupSoftmaxLoss setups SoftmaxLossLayer from caffe model.

Types

type Blob

type Blob interface {
	GetNum() int32
	GetShape() *caffe.BlobShape
	GetHeight() int32
	GetWidth() int32
	GetChannels() int32
}

Blob is alias of Blob.

type Caffe2Go

type Caffe2Go struct {
	Network *network.Network
}

Caffe2Go is interface of caffe2go.

func NewCaffe2Go

func NewCaffe2Go(modelPath string) (*Caffe2Go, error)

NewCaffe2Go is constructor.

func (*Caffe2Go) Predict

func (c2g *Caffe2Go) Predict(imagePath string, size uint, means []float32) ([][][]float32, error)

Predict start network.

type LayerParameter

type LayerParameter interface {
	GetName() string
	GetBottom() []string
	GetTop() []string
	GetLossWeight() []float32
	GetBlobs() []*caffe.BlobProto
	GetInclude() []*caffe.NetStateRule
	GetExclude() []*caffe.NetStateRule
	GetTransformParam() *caffe.TransformationParameter
	GetLossParam() *caffe.LossParameter
	GetAccuracyParam() *caffe.AccuracyParameter
	GetArgmaxParam() *caffe.ArgMaxParameter
	GetConcatParam() *caffe.ConcatParameter
	GetContrastiveLossParam() *caffe.ContrastiveLossParameter
	GetConvolutionParam() *caffe.ConvolutionParameter
	GetDataParam() *caffe.DataParameter
	GetDropoutParam() *caffe.DropoutParameter
	GetDummyDataParam() *caffe.DummyDataParameter
	GetEltwiseParam() *caffe.EltwiseParameter
	GetExpParam() *caffe.ExpParameter
	GetHdf5DataParam() *caffe.HDF5DataParameter
	GetHdf5OutputParam() *caffe.HDF5OutputParameter
	GetHingeLossParam() *caffe.HingeLossParameter
	GetImageDataParam() *caffe.ImageDataParameter
	GetInfogainLossParam() *caffe.InfogainLossParameter
	GetInnerProductParam() *caffe.InnerProductParameter
	GetLrnParam() *caffe.LRNParameter
	GetMemoryDataParam() *caffe.MemoryDataParameter
	GetMvnParam() *caffe.MVNParameter
	GetPoolingParam() *caffe.PoolingParameter
	GetPowerParam() *caffe.PowerParameter
	GetReluParam() *caffe.ReLUParameter
	GetSigmoidParam() *caffe.SigmoidParameter
	GetSoftmaxParam() *caffe.SoftmaxParameter
	GetSliceParam() *caffe.SliceParameter
	GetTanhParam() *caffe.TanHParameter
	GetThresholdParam() *caffe.ThresholdParameter
	GetWindowDataParam() *caffe.WindowDataParameter
}

LayerParameter is alias for LayerParameter.

type Parameter

type Parameter interface {
	GetKernelH() uint32
	GetKernelW() uint32
	GetKernelSize() uint32
	GetStrideH() uint32
	GetStrideW() uint32
	GetStride() uint32
	GetPad() uint32
	GetPadH() uint32
	GetPadW() uint32
}

Parameter is alias of parameter.

Jump to

Keyboard shortcuts

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