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

Function MapPeek

tensorflow/go/op/wrappers.go:5750–5776  ·  view source on GitHub ↗

Op peeks at the values at the specified key. If the underlying container does not contain this key this op will block until it does.

(scope *Scope, key tf.Output, indices tf.Output, dtypes []tf.DataType, optional ...MapPeekAttr)

Source from the content-addressed store, hash-verified

5748// underlying container does not contain this key
5749// this op will block until it does.
5750func MapPeek(scope *Scope, key tf.Output, indices tf.Output, dtypes []tf.DataType, optional ...MapPeekAttr) (values []tf.Output) {
5751 if scope.Err() != nil {
5752 return
5753 }
5754 attrs := map[string]interface{}{"dtypes": dtypes}
5755 for _, a := range optional {
5756 a(attrs)
5757 }
5758 opspec := tf.OpSpec{
5759 Type: "MapPeek",
5760 Input: []tf.Input{
5761 key, indices,
5762 },
5763 Attrs: attrs,
5764 }
5765 op := scope.AddOperation(opspec)
5766 if scope.Err() != nil {
5767 return
5768 }
5769 var idx int
5770 var err error
5771 if values, idx, err = makeOutputList(op, idx, "values"); err != nil {
5772 scope.UpdateErr("MapPeek", err)
5773 return
5774 }
5775 return values
5776}
5777
5778// MapStageAttr is an optional argument to MapStage.
5779type MapStageAttr func(optionalAttr)

Callers

nothing calls this directly

Calls 5

aClass · 0.85
makeOutputListFunction · 0.85
UpdateErrMethod · 0.80
ErrMethod · 0.45
AddOperationMethod · 0.45

Tested by

no test coverage detected