本文整理汇总了C++中FileNode::readRaw方法的典型用法代码示例。如果您正苦于以下问题:C++ FileNode::readRaw方法的具体用法?C++ FileNode::readRaw怎么用?C++ FileNode::readRaw使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FileNode
的用法示例。
在下文中一共展示了FileNode::readRaw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: read
void read( const FileNode& fn )
{
clear();
vector<int> _layer_sizes;
readVectorOrMat(fn["layer_sizes"], _layer_sizes);
setLayerSizes( _layer_sizes );
int i, l_count = layer_count();
read_params(fn);
size_t esz = weights[0].elemSize();
FileNode w = fn["input_scale"];
w.readRaw("d", weights[0].ptr(), weights[0].total()*esz);
w = fn["output_scale"];
w.readRaw("d", weights[l_count].ptr(), weights[l_count].total()*esz);
w = fn["inv_output_scale"];
w.readRaw("d", weights[l_count+1].ptr(), weights[l_count+1].total()*esz);
FileNodeIterator w_it = fn["weights"].begin();
for( i = 1; i < l_count; i++, ++w_it )
(*w_it).readRaw("d", weights[i].ptr(), weights[i].total()*esz);
trained = true;
}