提交 7a322df0 编写于 作者: W wangyang59

deconv implementation mionr changes in ConvBaseLayer.cpp and config_parser.py

上级 d116b17f
...@@ -20,12 +20,8 @@ bool ConvBaseLayer::init(const LayerMap& layerMap, ...@@ -20,12 +20,8 @@ bool ConvBaseLayer::init(const LayerMap& layerMap,
const ParameterMap& parameterMap) { const ParameterMap& parameterMap) {
/* Initialize the basic parent class */ /* Initialize the basic parent class */
Layer::init(layerMap, parameterMap); Layer::init(layerMap, parameterMap);
isDeconv_ = (config_.type() == "exconv" || config_.type() == "cudnn_conv")
if (config_.type() == "exconv" || config_.type() == "cudnn_conv") { ? false : true;
isDeconv_ = false;
} else {
isDeconv_ = true;
}
/* Initialize the convolutional layer parameter */ /* Initialize the convolutional layer parameter */
numFilters_ = config_.num_filters(); numFilters_ = config_.num_filters();
...@@ -111,9 +107,9 @@ size_t ConvBaseLayer::calOutputSize() { ...@@ -111,9 +107,9 @@ size_t ConvBaseLayer::calOutputSize() {
outputSize(inH[i], filterSizeY_[i], paddingY_[i], strideY_[i])); outputSize(inH[i], filterSizeY_[i], paddingY_[i], strideY_[i]));
outW.push_back( outW.push_back(
outputSize(inW[i], filterSize_[i], padding_[i], stride_[i])); outputSize(inW[i], filterSize_[i], padding_[i], stride_[i]));
CHECK_EQ(outH[i], outH[0]);
CHECK_EQ(outW[i], outW[0]);
} }
CHECK_EQ(outH[i], outH[0]);
CHECK_EQ(outW[i], outW[0]);
} }
getOutput().setFrameHeight(outH[0]); getOutput().setFrameHeight(outH[0]);
getOutput().setFrameWidth(outW[0]); getOutput().setFrameWidth(outW[0]);
......
...@@ -1666,11 +1666,6 @@ class ConvTransLayerBase(LayerBase): ...@@ -1666,11 +1666,6 @@ class ConvTransLayerBase(LayerBase):
if self.layer_type == "cudnn_convt": if self.layer_type == "cudnn_convt":
config_assert(use_gpu, "cudnn_convt only support GPU") config_assert(use_gpu, "cudnn_convt only support GPU")
# if (use_gpu == 1 and self.layer_type != "exconvt" and
# (parallel_nn == 0 or self.config.device > -1)):
# self.layer_type = "cudnn_convt"
# else:
# self.layer_type = "exconvt"
# cudnn_convt has not been implemented so use exconvt only # cudnn_convt has not been implemented so use exconvt only
self.layer_type = "exconvt" self.layer_type = "exconvt"
# need to specify layer in config # need to specify layer in config
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册