提交 c37da0bd 编写于 作者: Y yangyaming

Remove hasParamInitialValue flag.

上级 2bf4f1bb
......@@ -498,12 +498,9 @@ void initTestLayer(TestConfig testConf,
paraConfig.add_dims((*layerMap)[input.input_layer_name()]->getSize());
paraConfig.add_dims(testConf.layerConfig.size());
}
if (testConf.hasParamInitialValue) {
paraConfig.set_initial_mean(testConf.paramInitialMean);
paraConfig.set_initial_std(testConf.paramInitialStd);
} else {
paraConfig.set_initial_std(1);
}
CHECK_GE(testConf.paramInitialStd, 0);
paraConfig.set_initial_mean(testConf.paramInitialMean);
paraConfig.set_initial_std(testConf.paramInitialStd);
initParameter(paraName, paraSize, inputDef.isStatic, false, paraConfig);
}
}
......
......@@ -127,7 +127,6 @@ struct TestConfig {
size_t biasSize;
real paramInitialMean;
real paramInitialStd;
bool hasParamInitialValue;
bool testAccumulate;
bool testState;
bool staticBias;
......@@ -136,7 +135,6 @@ struct TestConfig {
: biasSize(0),
paramInitialMean(0.0),
paramInitialStd(1.0),
hasParamInitialValue(false),
testAccumulate(true),
testState(false),
staticBias(false),
......
......@@ -1661,7 +1661,6 @@ TEST(Layer, PadLayer) {
TEST(Layer, CrossChannelNormLayer) {
TestConfig config;
config.hasParamInitialValue = true;
config.paramInitialMean = 1.;
config.paramInitialStd = 0.;
config.layerConfig.set_type("norm");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册