Class: Tensorflow::Data::Iterator

Inherits:
Object
  • Object
show all
Defined in:
lib/tensorflow/data/iterator.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

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_shapesObject (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_typesObject (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_nextObject



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