本文整理汇总了C++中layer_configuration_specific::write方法的典型用法代码示例。如果您正苦于以下问题:C++ layer_configuration_specific::write方法的具体用法?C++ layer_configuration_specific::write怎么用?C++ layer_configuration_specific::write使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类layer_configuration_specific
的用法示例。
在下文中一共展示了layer_configuration_specific::write方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sizeof
supervised_data_stream_writer::supervised_data_stream_writer(
std::tr1::shared_ptr<std::ostream> output_stream,
const layer_configuration_specific& input_configuration,
const layer_configuration_specific& output_configuration)
: out_stream(output_stream), entry_count(0), type_code(neuron_data_type::type_unknown)
{
out_stream->exceptions(std::ostream::failbit | std::ostream::badbit);
input_neuron_count = input_configuration.get_neuron_count();
output_neuron_count = output_configuration.get_neuron_count();
out_stream->write(reinterpret_cast<const char*>(supervised_data_stream_schema::supervised_data_stream_guid.data), sizeof(supervised_data_stream_schema::supervised_data_stream_guid.data));
input_configuration.write(*out_stream);
output_configuration.write(*out_stream);
type_code_pos = out_stream->tellp();
out_stream->write(reinterpret_cast<const char*>(&type_code), sizeof(type_code));
entry_count_pos = out_stream->tellp();
out_stream->write(reinterpret_cast<const char*>(&entry_count), sizeof(entry_count));
}
示例2: sizeof
structured_data_stream_writer::structured_data_stream_writer(
nnforge_shared_ptr<std::ostream> output_stream,
const layer_configuration_specific& config)
: out_stream(output_stream), entry_count(0)
{
out_stream->exceptions(std::ostream::failbit | std::ostream::badbit);
neuron_count = config.get_neuron_count();
out_stream->write(reinterpret_cast<const char*>(structured_data_stream_schema::structured_data_stream_guid.data), sizeof(structured_data_stream_schema::structured_data_stream_guid.data));
config.write(*out_stream);
entry_count_pos = out_stream->tellp();
out_stream->write(reinterpret_cast<const char*>(&entry_count), sizeof(entry_count));
}