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