Sha256: b8d37cfccb8d21fd8cc2b40fa5373cb1af0cb4da48c6b49aa4fb1c31bdafdb91
Contents?: true
Size: 597 Bytes
Versions: 3
Compression:
Stored size: 597 Bytes
Contents
module TensorStream # Class that defines a TensorStream placeholder class Placeholder < Tensor def initialize(data_type, rank, shape, options = {}) @graph = options[:graph] || TensorStream.get_default_graph @data_type = data_type @rank = rank @shape = TensorShape.new(shape, rank) @value = nil @is_const = false @source = format_source(caller_locations) @name = options[:name] || build_name @graph.add_node(self) end private def build_name "Placeholder#{graph.get_placeholder_counter}:#{@rank}" end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tensor_stream-0.1.4 | lib/tensor_stream/placeholder.rb |
tensor_stream-0.1.3 | lib/tensor_stream/placeholder.rb |
tensor_stream-0.1.2 | lib/tensor_stream/placeholder.rb |