Sha256: ffc2559ce539bec1c3cde4c832e175109e921ee120a545d92cfca3e21436acae

Contents?: true

Size: 586 Bytes

Versions: 19

Compression:

Stored size: 586 Bytes

Contents

module TensorStream
  # Class that defines a TensorStream placeholder
  class Placeholder < Tensor
    def initialize(data_type, rank, shape, options = {})
      setup_initial_state(options)

      @data_type = data_type.to_sym
      @rank = rank
      @shape = TensorShape.new(shape, rank)
      @value = nil
      @is_const = false

      @name = [@graph.get_name_scope, options[:name] || build_name].compact.reject(&:empty?).join('/')
      @graph.add_node(self)
    end

    private

    def build_name
      "Placeholder#{graph.get_placeholder_counter}:#{@rank}"
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
tensor_stream-0.9.8 lib/tensor_stream/placeholder.rb
tensor_stream-0.9.7 lib/tensor_stream/placeholder.rb
tensor_stream-0.9.6 lib/tensor_stream/placeholder.rb
tensor_stream-0.9.5 lib/tensor_stream/placeholder.rb
tensor_stream-0.9.2 lib/tensor_stream/placeholder.rb
tensor_stream-0.9.1 lib/tensor_stream/placeholder.rb
tensor_stream-0.9.0 lib/tensor_stream/placeholder.rb
tensor_stream-0.8.6 lib/tensor_stream/placeholder.rb
tensor_stream-0.8.5 lib/tensor_stream/placeholder.rb
tensor_stream-0.8.1 lib/tensor_stream/placeholder.rb
tensor_stream-0.8.0 lib/tensor_stream/placeholder.rb
tensor_stream-0.7.0 lib/tensor_stream/placeholder.rb
tensor_stream-0.6.1 lib/tensor_stream/placeholder.rb
tensor_stream-0.6.0 lib/tensor_stream/placeholder.rb
tensor_stream-0.5.1 lib/tensor_stream/placeholder.rb
tensor_stream-0.5.0 lib/tensor_stream/placeholder.rb
tensor_stream-0.4.1 lib/tensor_stream/placeholder.rb
tensor_stream-0.4.0 lib/tensor_stream/placeholder.rb
tensor_stream-0.3.0 lib/tensor_stream/placeholder.rb