fix copy method in caffe.rb