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

Function IteratorGetNext

tensorflow/go/op/wrappers.go:8093–8116  ·  view source on GitHub ↗

Gets the next output from the given iterator .

(scope *Scope, iterator tf.Output, output_types []tf.DataType, output_shapes []tf.Shape)

Source from the content-addressed store, hash-verified

8091
8092// Gets the next output from the given iterator .
8093func IteratorGetNext(scope *Scope, iterator tf.Output, output_types []tf.DataType, output_shapes []tf.Shape) (components []tf.Output) {
8094 if scope.Err() != nil {
8095 return
8096 }
8097 attrs := map[string]interface{}{"output_types": output_types, "output_shapes": output_shapes}
8098 opspec := tf.OpSpec{
8099 Type: "IteratorGetNext",
8100 Input: []tf.Input{
8101 iterator,
8102 },
8103 Attrs: attrs,
8104 }
8105 op := scope.AddOperation(opspec)
8106 if scope.Err() != nil {
8107 return
8108 }
8109 var idx int
8110 var err error
8111 if components, idx, err = makeOutputList(op, idx, "components"); err != nil {
8112 scope.UpdateErr("IteratorGetNext", err)
8113 return
8114 }
8115 return components
8116}
8117
8118// Makes its input available to the next iteration.
8119//

Callers 1

TestDatasetFunction · 0.85

Calls 4

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

Tested by 1

TestDatasetFunction · 0.68