MCPcopy
hub / github.com/nlpodyssey/spago / StandardModel

Interface StandardModel

nn/model.go:101–106  ·  view source on GitHub ↗

StandardModel consists of a model that implements a Forward variadic function that accepts mat.Tensor and returns a slice of mat.Tensor. It is called StandardModel since this is the most frequent forward method among all implemented neural models.

Source from the content-addressed store, hash-verified

99// StandardModel consists of a model that implements a Forward variadic function that accepts mat.Tensor and returns a slice of mat.Tensor.
100// It is called StandardModel since this is the most frequent forward method among all implemented neural models.
101type StandardModel interface {
102 Model
103
104 // Forward executes the forward step of the model.
105 Forward(...mat.Tensor) []mat.Tensor
106}
107
108type ModuleList[T StandardModel] []T
109

Callers 8

testReshapeForwardFunction · 0.65
testAddForwardFunction · 0.65
testAddScalarForwardFunction · 0.65
testAddScalarForward2Function · 0.65
testSwishBForwardFunction · 0.65
testReduceSumForwardFunction · 0.65
testScalarProdForwardFunction · 0.65
testELUForwardFunction · 0.65

Implementers 15

Modelnn/attention/selfattention/model.go
Modelnn/attention/multiheadattention/model.
Modelnn/linear/linear.go
Modelnn/sgu/model.go
Modelnn/dropout/dropout.go
Modelnn/flatten/flatten.go
Modelnn/convolution/convolution2d/model.go
Modelnn/convolution/conv1x1/model.go
Modelnn/convolution/convolution1d/model.go
Modelnn/recurrent/srn/srn.go
Modelnn/recurrent/lstm/lstm.go
Modelnn/recurrent/gru/gru.go

Calls

no outgoing calls

Tested by

no test coverage detected