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

Method HasGrad

mat/tensor.go:40–40  ·  view source on GitHub ↗

HasGrad reports whether there are accumulated gradients.

()

Source from the content-addressed store, hash-verified

38 Grad() Tensor
39 // HasGrad reports whether there are accumulated gradients.
40 HasGrad() bool
41 // RequiresGrad reports whether the node requires gradients.
42 RequiresGrad() bool
43 // AccGrad accumulates the gradients into the node.

Callers 10

testNewDenseGradFunction · 0.65
testNewScalarGradFunction · 0.65
testDenseGradientsFunction · 0.65
testOperatorGradientsFunction · 0.65
testWrapperGradientsFunction · 0.65
testModelForwardFunction · 0.65
testModelForwardFunction · 0.65
testModelForwardFunction · 0.65
TestEmbedding_GradFunction · 0.65
OptimizeMethod · 0.65

Implementers 1

Operatorag/operator.go

Calls

no outgoing calls

Tested by 9

testNewDenseGradFunction · 0.52
testNewScalarGradFunction · 0.52
testDenseGradientsFunction · 0.52
testOperatorGradientsFunction · 0.52
testWrapperGradientsFunction · 0.52
testModelForwardFunction · 0.52
testModelForwardFunction · 0.52
testModelForwardFunction · 0.52
TestEmbedding_GradFunction · 0.52