如何在Caffe中设置全局权重填充器?

现在我正在逐层编写权重填充器,类似于

layer {  name: "Convolution1"  type: "Convolution"  bottom: "data"  top: "Convolution1"  convolution_param {    num_output: 20    kernel_size: 5    weight_filler {      type: "xavier"    }  }}

我如何设置全局的权重填充器类型?谢谢。


回答:

目前似乎没有其他方法可以做到。在caffe.proto文件中,NetParameter的定义如下,其中没有类似default_weight_filler的选项。

message NetParameter {  optional string name = 1; // consider giving the network a name  // DEPRECATED. See InputParameter. The input blobs to the network.  repeated string input = 3;  // DEPRECATED. See InputParameter. The shape of the input blobs.  repeated BlobShape input_shape = 8;  // 4D input dimensions -- deprecated.  Use "input_shape" instead.  // If specified, for each input blob there should be four  // values specifying the num, channels, height and width of the input blob.  // Thus, there should be a total of (4 * #input) numbers.  repeated int32 input_dim = 4;  // Whether the network will force every layer to carry out backward operation.  // If set False, then whether to carry out backward is determined  // automatically according to the net structure and learning rates.  optional bool force_backward = 5 [default = false];  // The current "state" of the network, including the phase, level, and stage.  // Some layers may be included/excluded depending on this state and the states  // specified in the layers' include and exclude fields.  optional NetState state = 6;  // Print debugging information about results while running Net::Forward,  // Net::Backward, and Net::Update.  optional bool debug_info = 7 [default = false];  // The layers that make up the net.  Each of their configurations, including  // connectivity and behavior, is specified as a LayerParameter.  repeated LayerParameter layer = 100;  // ID 100 so layers are printed last.  // DEPRECATED: use 'layer' instead.  repeated V1LayerParameter layers = 2;}

Related Posts

使用LSTM在Python中预测未来值

这段代码可以预测指定股票的当前日期之前的值,但不能预测…

如何在gensim的word2vec模型中查找双词组的相似性

我有一个word2vec模型,假设我使用的是googl…

dask_xgboost.predict 可以工作但无法显示 – 数据必须是一维的

我试图使用 XGBoost 创建模型。 看起来我成功地…

ML Tuning – Cross Validation in Spark

我在https://spark.apache.org/…

如何在React JS中使用fetch从REST API获取预测

我正在开发一个应用程序,其中Flask REST AP…

如何分析ML.NET中多类分类预测得分数组?

我在ML.NET中创建了一个多类分类项目。该项目可以对…

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注