Class: Caffe::Blob

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/caffe/blob.rb

Overview

Wrapper class for caffe::Blob<float>

Defined Under Namespace

Classes: Cursor

Instance Method Summary collapse

Instance Method Details

#[](index) ⇒ Object



11
12
13
# File 'lib/caffe/blob.rb', line 11

def [](index)
  data[index]
end

#[]=(index, x) ⇒ Object



15
16
17
# File 'lib/caffe/blob.rb', line 15

def []=(index, x)
  data[index] = x
end

#copy_from!(x) ⇒ Object



23
24
25
# File 'lib/caffe/blob.rb', line 23

def copy_from!(x)
  data.copy_from! x
end

#each(&blk) ⇒ Object



27
28
29
# File 'lib/caffe/blob.rb', line 27

def each(&blk)
  data.each(&blk)
end

#sizeObject Also known as: count



19
20
21
# File 'lib/caffe/blob.rb', line 19

def size
  data.size
end