Documentation
¶
Index ¶
- func EucDistance(x, y *G.Node) (retVal *G.Node)
- func InitForwardOnlyVm(uProfileDim, uBehaviorSize, uBehaviorDim, iFeatureDim, cFeatureDim int, ...) (err error)
- func PRelu(x, slop *G.Node) (retVal *G.Node)
- func Predict(m Model, numExamples, batchSize int, si *rcmd.SampleInfo, inputs tensor.Tensor) (y []float64, err error)
- func Train(uProfileDim, uBehaviorSize, uBehaviorDim, iFeatureDim, cFeatureDim int, ...) (err error)
- type DinNet
- func (din *DinNet) Fwd(xUserProfile, xUbMatrix, xItemFeature, xCtxFeature *G.Node, ...) (err error)
- func (din *DinNet) Graph() *G.ExprGraph
- func (din *DinNet) In() G.Nodes
- func (din *DinNet) Marshal() (data []byte, err error)
- func (din *DinNet) Out() *G.Node
- func (din *DinNet) SetVM(vm G.VM)
- func (din *DinNet) Vm() G.VM
- type Model
- type SimpleMLP
- func (mlp *SimpleMLP) Fwd(xUserProfile, ubMatrix, xItemFeature, xCtxFeature *G.Node, ...) (err error)
- func (mlp *SimpleMLP) Graph() *G.ExprGraph
- func (mlp *SimpleMLP) In() G.Nodes
- func (mlp *SimpleMLP) Marshal() (data []byte, err error)
- func (mlp *SimpleMLP) Out() *G.Node
- func (mlp *SimpleMLP) SetVM(vm G.VM)
- func (mlp *SimpleMLP) Vm() G.VM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EucDistance ¶
EucDistance is the Euclidean distance between two matrix, typically used for calculating the distance between two embedding. Case1: x, y shapes are same, no broadcast. output shape will be x.shape[:-1] Case2: x, y shapes are different, broadcast will be applied on the smaller dim. output shape will be something like x.shape[:-1] but with a broadcast dim
func InitForwardOnlyVm ¶
Types ¶
type DinNet ¶
type DinNet struct {
// contains filtered or unexported fields
}
func NewDinNetFromJson ¶
func (*DinNet) Fwd ¶
func (din *DinNet) Fwd(xUserProfile, xUbMatrix, xItemFeature, xCtxFeature *G.Node, batchSize, uBehaviorSize, uBehaviorDim int) (err error)
Fwd performs the forward pass xUserProfile: [batchSize, userProfileDim] xUbMatrix: [batchSize, uBehaviorSize* uBehaviorDim] xUserBehaviors: [batchSize, uBehaviorSize, uBehaviorDim] xItemFeature: [batchSize, iFeatureDim] xContextFeature: [batchSize, cFeatureDim]
type SimpleMLP ¶
type SimpleMLP struct {
// contains filtered or unexported fields
}
func NewSimpleMLP ¶
func NewSimpleMLPFromJson ¶
Click to show internal directories.
Click to hide internal directories.