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

fix codestyle

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