Class: Tensorflow::Data::Iterator
- Inherits:
-
Object
- Object
- Tensorflow::Data::Iterator
- Defined in:
- lib/tensorflow/data/iterator.rb
Direct Known Subclasses
InitializableIterator, OneShotIterator, ReinitializableIterator
Instance Attribute Summary collapse
-
#output_shapes ⇒ Object
readonly
Returns the value of attribute output_shapes.
-
#output_types ⇒ Object
readonly
Returns the value of attribute output_types.
Class Method Summary collapse
Instance Method Summary collapse
- #get_next ⇒ Object
-
#initialize(output_types, output_shapes = []) ⇒ Iterator
constructor
A new instance of Iterator.
Constructor Details
#initialize(output_types, output_shapes = []) ⇒ Iterator
Returns a new instance of Iterator.
10 11 12 13 |
# File 'lib/tensorflow/data/iterator.rb', line 10 def initialize(output_types, output_shapes=[]) @output_types = output_types @output_shapes = output_shapes end |
Instance Attribute Details
#output_shapes ⇒ Object (readonly)
Returns the value of attribute output_shapes.
4 5 6 |
# File 'lib/tensorflow/data/iterator.rb', line 4 def output_shapes @output_shapes end |
#output_types ⇒ Object (readonly)
Returns the value of attribute output_types.
4 5 6 |
# File 'lib/tensorflow/data/iterator.rb', line 4 def output_types @output_types end |
Class Method Details
.from_structure(output_types, output_shapes = [], shared_name: '') ⇒ Object
6 7 8 |
# File 'lib/tensorflow/data/iterator.rb', line 6 def self.from_structure(output_types, output_shapes=[], shared_name: '') ReinitializableIterator.new(output_types, output_shapes, shared_name: shared_name) end |
Instance Method Details
#get_next ⇒ Object
15 16 17 |
# File 'lib/tensorflow/data/iterator.rb', line 15 def get_next RawOps.iterator_get_next(@iterator, output_types: self.output_types, output_shapes: self.output_shapes) end |