Makes a new iterator from the given `dataset` and stores it in `iterator`. This operation may be executed multiple times. Each execution will reset the iterator in `iterator` to the first element of `dataset`. Returns the created operation.
(scope *Scope, dataset tf.Output, iterator tf.Output)
| 8142 | // |
| 8143 | // Returns the created operation. |
| 8144 | func MakeIterator(scope *Scope, dataset tf.Output, iterator tf.Output) (o *tf.Operation) { |
| 8145 | if scope.Err() != nil { |
| 8146 | return |
| 8147 | } |
| 8148 | opspec := tf.OpSpec{ |
| 8149 | Type: "MakeIterator", |
| 8150 | Input: []tf.Input{ |
| 8151 | dataset, iterator, |
| 8152 | }, |
| 8153 | } |
| 8154 | return scope.AddOperation(opspec) |
| 8155 | } |
| 8156 | |
| 8157 | // A container for an iterator resource. |
| 8158 | // |