Class: Integer

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

Class Method Summary collapse

Methods included from TensorStream::OpPatch

#%, #*, #**, #+, #-, #/, included

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/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