提交 ebb153b0 编写于 作者: H Haonan 提交者: GitHub

Merge pull request #416 from yu239/hl_activetype

change the act.name for LinearActivation() to "linear" so that it won't fail in hl_activetype; also fix the hasinputsset in submodel
...@@ -378,7 +378,7 @@ hl_activation_mode_t hlActiveType(const std::string& type) { ...@@ -378,7 +378,7 @@ hl_activation_mode_t hlActiveType(const std::string& type) {
return HL_ACTIVATION_RELU; return HL_ACTIVATION_RELU;
} else if (type == "tanh") { } else if (type == "tanh") {
return HL_ACTIVATION_TANH; return HL_ACTIVATION_TANH;
} else if (type == "linear") { } else if (type == "linear" || type == "") {
return HL_ACTIVATION_LINEAR; return HL_ACTIVATION_LINEAR;
} else { } else {
LOG(FATAL) << "Do not support activation type " << type; LOG(FATAL) << "Do not support activation type " << type;
......
...@@ -218,7 +218,7 @@ def Inputs(*args): ...@@ -218,7 +218,7 @@ def Inputs(*args):
@config_func @config_func
def HasInputsSet(): def HasInputsSet():
return len(g_config.model_config.input_layer_names) != 0 return len(g_current_submodel.input_layer_names) != 0
# Define the name of the output layers of the NeuralNetwork. # Define the name of the output layers of the NeuralNetwork.
......
...@@ -1766,7 +1766,7 @@ def img_pool_layer(input, pool_size, name=None, ...@@ -1766,7 +1766,7 @@ def img_pool_layer(input, pool_size, name=None,
:type pool_size_y: int|None :type pool_size_y: int|None
:param num_channels: number of input channel. :param num_channels: number of input channel.
:type num_channels: int :type num_channels: int
:param pool_type: pooling type. MaxPooling or AveragePooling. Default is :param pool_type: pooling type. MaxPooling or AvgPooling. Default is
MaxPooling. MaxPooling.
:type pool_type: BasePoolingType :type pool_type: BasePoolingType
:param stride: stride width of pooling. :param stride: stride width of pooling.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册