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

Function TestScopeWithGraph

tensorflow/go/op/scope_test.go:156–169  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

154}
155
156func TestScopeWithGraph(t *testing.T) {
157 s1 := NewScope()
158 Const(s1, "hello")
159 graph, err := s1.Finalize()
160 if err != nil {
161 t.Fatal(err)
162 }
163
164 s2 := NewScopeWithGraph(graph)
165 Const(s2.SubScope("addition"), "world")
166 if err := s2.Err(); err != nil {
167 t.Fatal(err)
168 }
169}
170
171func Example() {
172 // This example creates a Graph that multiplies a constant matrix with

Callers

nothing calls this directly

Calls 6

FinalizeMethod · 0.95
NewScopeFunction · 0.85
NewScopeWithGraphFunction · 0.85
SubScopeMethod · 0.80
ConstFunction · 0.70
ErrMethod · 0.45

Tested by

no test coverage detected