本文整理汇总了C++中NetParameter::mutable_layers方法的典型用法代码示例。如果您正苦于以下问题:C++ NetParameter::mutable_layers方法的具体用法?C++ NetParameter::mutable_layers怎么用?C++ NetParameter::mutable_layers使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NetParameter
的用法示例。
在下文中一共展示了NetParameter::mutable_layers方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
void Net<Dtype>::ReInit( NetParameter& param, const int batch_size )
{
layers_.clear();
layer_names_.clear();
layer_need_backward_.clear();
// blobs stores the blobs that store intermediate results between the
// layers.
blobs_.clear();
blob_names_.clear();
blob_need_backward_.clear();
// bottom_vecs stores the vectors containing the input for each layer.
// They don't actually host the blobs (blobs_ does), so we simply store
// pointers.
bottom_vecs_.clear();
bottom_id_vecs_.clear();
// top_vecs stores the vectors containing the output for each layer
top_vecs_.clear();
top_id_vecs_.clear();
// blob indices for the input and the output of the net
net_input_blob_indices_.clear();
net_input_blobs_.clear();
net_output_blobs_.clear();
// The parameters in the network.
params_.clear();
// the learning rate multipliers
params_lr_.clear();
// the weight decay multipliers
params_weight_decay_.clear();
param.mutable_layers(0)->mutable_layer()->set_batchsize(batch_size);
Init( param );
}