neuralnet

package
v0.0.0-...-ce5e274 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type INeuralNet

type INeuralNet interface {
	GetSyn0(i int32) *TVector
	GetDSyn0(i int32) *TVector
	NewDSyn0() *TVector
	GetSyn1(i int32) *TVector
	GetSyn1Neg(i int32) *TVector
	msgp.Encodable
	msgp.Decodable
	msgp.Marshaler
	msgp.Unmarshaler
	msgp.Sizer
}

type TNeuralNetImpl

type TNeuralNetImpl struct {
	Syn0    []TVector //V(i)
	Dsyn0   []TVector //D(i)
	Syn1    []TVector //for HS
	Syn1neg []TVector //for NEG
}

func NewNN

func NewNN(docSize, wordSize, dim int, useHS, useNEG bool) *TNeuralNetImpl

func (*TNeuralNetImpl) DecodeMsg

func (z *TNeuralNetImpl) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*TNeuralNetImpl) EncodeMsg

func (z *TNeuralNetImpl) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*TNeuralNetImpl) GetDSyn0

func (p *TNeuralNetImpl) GetDSyn0(i int32) *TVector

func (*TNeuralNetImpl) GetSyn0

func (p *TNeuralNetImpl) GetSyn0(i int32) *TVector

func (*TNeuralNetImpl) GetSyn1

func (p *TNeuralNetImpl) GetSyn1(i int32) *TVector

func (*TNeuralNetImpl) GetSyn1Neg

func (p *TNeuralNetImpl) GetSyn1Neg(i int32) *TVector

func (*TNeuralNetImpl) MarshalMsg

func (z *TNeuralNetImpl) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*TNeuralNetImpl) Msgsize

func (z *TNeuralNetImpl) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*TNeuralNetImpl) NewDSyn0

func (p *TNeuralNetImpl) NewDSyn0() *TVector

func (*TNeuralNetImpl) UnmarshalMsg

func (z *TNeuralNetImpl) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type TVector

type TVector []float32

func (TVector) Add

func (p TVector) Add(a TVector)

向量加法

func (*TVector) DecodeMsg

func (z *TVector) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (TVector) Divide

func (p TVector) Divide(a float32)

向量除法

func (TVector) Dot

func (p TVector) Dot(a TVector) (f float64)

向量点乘

func (TVector) EncodeMsg

func (z TVector) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (TVector) MarshalMsg

func (z TVector) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (TVector) Msgsize

func (z TVector) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (TVector) Multiply

func (p TVector) Multiply(a float64)

func (TVector) Reset

func (p TVector) Reset()

func (*TVector) UnmarshalMsg

func (z *TVector) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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