Method: Integer.placeholder

Defined in:
lib/tensor_stream/monkey_patches/integer.rb

.placeholder(name: nil, width: 32, shape: nil) ⇒ Object



4
5
6
7
8
9
# File 'lib/tensor_stream/monkey_patches/integer.rb', line 4

def self.placeholder(name: nil, width: 32, shape: nil)
  raise "invalid width passed #{width}" unless [16, 32, 64].include?(width)

  data_type = :"int#{width}"
  TensorStream.placeholder(data_type, name: name, shape: shape)
end