提交 11eb4d6f 编写于 作者: Y Yao,kun

fix codestyle

上级 733fc7ef
......@@ -28,8 +28,9 @@ namespace operators {
using paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class DropoutOp : public framework::OperatorWithKernel<DeviceType, DropoutParam,
operators::DropoutKernal<DeviceType, T>> {
class DropoutOp
: public framework::OperatorWithKernel<
DeviceType, DropoutParam, operators::DropoutKernal<DeviceType, T>> {
public:
DropoutOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const framework::AttributeMap attrs,
......@@ -49,4 +50,3 @@ class DropoutOp : public framework::OperatorWithKernel<DeviceType, DropoutParam,
} // namespace paddle_mobile
#endif
......@@ -26,7 +26,8 @@ namespace operators {
using namespace framework;
template <typename DeviceType, typename T>
class Im2SequenceOp : public framework::OperatorWithKernel<DeviceType, Im2SequenceParam,
class Im2SequenceOp : public framework::OperatorWithKernel<
DeviceType, Im2SequenceParam,
operators::Im2SequenceKernal<DeviceType, T>> {
public:
Im2SequenceOp(const std::string &type, const VariableNameMap &inputs,
......@@ -37,7 +38,8 @@ class Im2SequenceOp : public framework::OperatorWithKernel<DeviceType, Im2Sequen
scope),
param_(inputs, outputs, attrs, *scope) {}
using framework::OperatorWithKernel<DeviceType, Im2SequenceParam,
using framework::OperatorWithKernel<
DeviceType, Im2SequenceParam,
operators::Im2SequenceKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
......
......@@ -24,7 +24,7 @@ template <typename DeviceType, typename T>
class DropoutKernel : public framework::OpKernelBase<DeviceType, DropoutParam> {
public:
void Compute(const DropoutParam& param) const;
bool Init(const DropoutParam &para) const;
bool Init(const DropoutParam& para) const;
};
} // namespace operators
} // namespace paddle_mobile
......@@ -935,8 +935,8 @@ class FusionConvAddBNReluParam : public OpParam {
Print &operator<<(Print &printer, const FusionConvAddParam &conv_param);
#endif
#ifdef IM2SEQUENCE_OP
class Im2SequenceParam : public OpParam {
#ifdef IM2SEQUENCE_OP
class Im2SequenceParam : public OpParam {
public:
Im2SequenceParam(const VariableNameMap &inputs,
const VariableNameMap &outputs, const AttributeMap &attrs,
......@@ -964,11 +964,11 @@ Print &operator<<(Print &printer, const FusionConvAddParam &conv_param);
vector<int> kernels_;
vector<int> strides_;
vector<int> paddings_;
};
};
#endif
#ifdef DROPOUT_OP
class DropoutParam : public OpParam {
class DropoutParam : public OpParam {
public:
DropoutParam(const VariableNameMap &inputs, const VariableNameMap &outputs,
const AttributeMap &attrs, const Scope &scope) {
......@@ -983,7 +983,7 @@ Print &operator<<(Print &printer, const FusionConvAddParam &conv_param);
private:
Tensor *input_x_;
Tensor *out_;
};
};
#endif
} // namespace operators
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册