MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / Operations

Method Operations

tensorflow/go/graph.go:164–175  ·  view source on GitHub ↗

Operations returns a list of all operations in the graph

()

Source from the content-addressed store, hash-verified

162
163// Operations returns a list of all operations in the graph
164func (g *Graph) Operations() []Operation {
165 var pos C.size_t
166 ops := []Operation{}
167 for {
168 cop := C.TF_GraphNextOperation(g.c, &pos)
169 if cop == nil {
170 break
171 }
172 ops = append(ops, Operation{cop, g})
173 }
174 return ops
175}
176
177// AddGradients adds operations to compute the partial derivatives of the sum of tensors in y
178// with respect to tensors in x, i.e., d(y[0] + y[1] + ...) / d x[0], d(y[0] + y[1] + ... ) / d x[1] etc.

Callers 1

hasOperationsFunction · 0.80

Calls 1

appendFunction · 0.85

Tested by 1

hasOperationsFunction · 0.64