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)
| 5748 | // underlying container does not contain this key |
| 5749 | // this op will block until it does. |
| 5750 | func 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. |
| 5779 | type MapStageAttr func(optionalAttr) |
nothing calls this directly
no test coverage detected