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

Method AddOperation

tensorflow/go/op/scope.go:75–92  ·  view source on GitHub ↗

AddOperation adds the operation to the Graph managed by s. If there is a name prefix associated with s (such as if s was created by a call to SubScope), then this prefix will be applied to the name of the operation being added. See also Graph.AddOperation.

(args tf.OpSpec)

Source from the content-addressed store, hash-verified

73// by a call to SubScope), then this prefix will be applied to the name
74// of the operation being added. See also Graph.AddOperation.
75func (s *Scope) AddOperation(args tf.OpSpec) *tf.Operation {
76 if s.Err() != nil {
77 return nil
78 }
79 if args.Name == "" {
80 args.Name = args.Type
81 }
82 if s.namespace != "" {
83 args.Name = s.namespace + "/" + args.Name
84 }
85 args.ControlDependencies = append(args.ControlDependencies, s.controlDependencies...)
86 args.Device = s.device
87 op, err := s.graph.AddOperation(args)
88 if err != nil {
89 s.UpdateErr(args.Type, err)
90 }
91 return op
92}
93
94// SubScope returns a new Scope which will cause all operations added to the
95// graph to be namespaced with 'namespace'. If namespace collides with an

Callers 15

FingerprintFunction · 0.45
FakeQuantWithMinMaxVarsFunction · 0.45
LowerBoundFunction · 0.45
QuantizedConcatFunction · 0.45
QuantizeV2Function · 0.45
QuantizeAndDequantizeV3Function · 0.45
QuantizeAndDequantizeV2Function · 0.45
ExtractImagePatchesFunction · 0.45
SpaceToDepthFunction · 0.45
BatchToSpaceFunction · 0.45

Calls 3

ErrMethod · 0.95
UpdateErrMethod · 0.95
appendFunction · 0.85

Tested by

no test coverage detected