Class: Float

Inherits:
Object
  • Object
show all
Includes:
TensorStream::MonkeyPatch
Defined in:
lib/tensor_stream/monkey_patches/float.rb

Class Method Summary collapse

Methods included from TensorStream::MonkeyPatch

#shape, #t

Class Method Details

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


4
5
6
7
8
9
# File 'lib/tensor_stream/monkey_patches/float.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 = :"float#{width}"
  TensorStream.placeholder(data_type, name: name, shape: shape)
end