Method: Tensorflow::Graph::OperationAttr#shape
- Defined in:
- lib/tensorflow/graph/operation_attr.rb
#shape ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/tensorflow/graph/operation_attr.rb', line 87 def shape size = self.[:total_size] if size == -1 [] else pointer = ::FFI::MemoryPointer.new(:int64, size) Status.check do |status| FFI.TF_OperationGetAttrShape(self.operation, self.name, pointer, size, status) end pointer.read_array_of_int64(size) end end |