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

Function WithGrad

mat/dense_new.go:22–26  ·  view source on GitHub ↗
(value bool)

Source from the content-addressed store, hash-verified

20type OptionsFunc func(opt *Options)
21
22func WithGrad(value bool) OptionsFunc {
23 return func(opts *Options) {
24 opts.RequiresGrad = value
25 }
26}
27
28func WithShape(shape ...int) OptionsFunc {
29 return func(opts *Options) {

Callers 15

testReshapeForwardFunction · 0.92
testAddForwardFunction · 0.92
testAddScalarForwardFunction · 0.92
testAddScalarForward2Function · 0.92
testSwishBForwardFunction · 0.92
testReduceSumForwardFunction · 0.92
testScalarProdForwardFunction · 0.92
testELUForwardFunction · 0.92
testAbsForwardFunction · 0.92
testSafeLogForwardFunction · 0.92
testTanForwardFunction · 0.92
testTanhForwardFunction · 0.92

Calls

no outgoing calls

Tested by 15

testReshapeForwardFunction · 0.74
testAddForwardFunction · 0.74
testAddScalarForwardFunction · 0.74
testAddScalarForward2Function · 0.74
testSwishBForwardFunction · 0.74
testReduceSumForwardFunction · 0.74
testScalarProdForwardFunction · 0.74
testELUForwardFunction · 0.74
testAbsForwardFunction · 0.74
testSafeLogForwardFunction · 0.74
testTanForwardFunction · 0.74
testTanhForwardFunction · 0.74