提交 e6302412 编写于 作者: L liuruilong

format files

上级 20d68051
......@@ -109,15 +109,15 @@ class OperatorWithKernel : public OperatorBase<Dtype> {
OperatorWithKernel(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const AttributeMap &attrs,
std::shared_ptr<Scope> scope)
: OperatorBase<Dtype>(type, inputs, outputs, attrs, scope), param_(inputs, outputs, attrs, *scope){
: OperatorBase<Dtype>(type, inputs, outputs, attrs, scope),
param_(inputs, outputs, attrs, *scope) {
kernel_.Init(param_);
}
virtual void RunImpl() const {
this->kernel_.Compute(this->param_);
}
virtual void RunImpl() const { this->kernel_.Compute(this->param_); }
virtual void InferShape() const = 0;
protected:
KernelType kernel_;
ParamType param_;
......@@ -135,9 +135,7 @@ class OpKernelBase {
* 所有结构体存在与: paddle-mobile/src/operators/op_param.h
* */
virtual void Compute(const P &para) const = 0;
virtual bool Init(const P &para) const {
return true;
};
virtual bool Init(const P &para) const { return true; };
virtual ~OpKernelBase() = default;
};
......
......@@ -25,15 +25,17 @@ namespace paddle_mobile {
namespace operators {
using std::string;
template <typename DeviceType, typename T>
class BatchNormOp : public framework::OperatorWithKernel<DeviceType, BatchNormParam,BatchNormKernel<DeviceType, T>> {
class BatchNormOp
: public framework::OperatorWithKernel<DeviceType, BatchNormParam,
BatchNormKernel<DeviceType, T>> {
public:
BatchNormOp(const string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, BatchNormParam, BatchNormKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {
}
: framework::OperatorWithKernel<DeviceType, BatchNormParam,
BatchNormKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
void InferShape() const override;
......
......@@ -28,16 +28,21 @@ namespace operators {
using paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class BoxCoderOp : public framework::OperatorWithKernel<DeviceType, BoxCoderParam, operators::BoxCoderKernel<DeviceType, T>> {
class BoxCoderOp
: public framework::OperatorWithKernel<
DeviceType, BoxCoderParam, operators::BoxCoderKernel<DeviceType, T>> {
public:
BoxCoderOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, BoxCoderParam, operators::BoxCoderKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, BoxCoderParam,
operators::BoxCoderKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, BoxCoderParam, operators::BoxCoderKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, BoxCoderParam,
operators::BoxCoderKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -24,17 +24,22 @@ namespace paddle_mobile {
namespace operators {
using std::string;
template <typename DeviceType, typename T>
class ConcatOp : public framework::OperatorWithKernel<DeviceType, ConcatParam, operators::ConcatKernel<DeviceType, T>> {
class ConcatOp
: public framework::OperatorWithKernel<
DeviceType, ConcatParam, operators::ConcatKernel<DeviceType, T>> {
public:
ConcatOp(const string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, ConcatParam, operators::ConcatKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {
}
: framework::OperatorWithKernel<DeviceType, ConcatParam,
operators::ConcatKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, ConcatParam, operators::ConcatKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, ConcatParam,
operators::ConcatKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
};
......
......@@ -24,15 +24,20 @@ namespace paddle_mobile {
namespace operators {
using std::string;
template <typename DeviceType, typename T>
class ConvOp : public framework::OperatorWithKernel<DeviceType, ConvParam, operators::ConvKernel<DeviceType, T>> {
class ConvOp
: public framework::OperatorWithKernel<
DeviceType, ConvParam, operators::ConvKernel<DeviceType, T>> {
public:
ConvOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, ConvParam, operators::ConvKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope){}
: framework::OperatorWithKernel<DeviceType, ConvParam,
operators::ConvKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, ConvParam, operators::ConvKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, ConvParam,
operators::ConvKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
private:
......
......@@ -24,16 +24,22 @@ namespace paddle_mobile {
namespace operators {
template <typename DeviceType, typename T>
class DepthwiseConvOp : public framework::OperatorWithKernel<DeviceType, ConvParam, operators::DepthwiseConvKernel<DeviceType, T>> {
class DepthwiseConvOp : public framework::OperatorWithKernel<
DeviceType, ConvParam,
operators::DepthwiseConvKernel<DeviceType, T>> {
public:
DepthwiseConvOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, ConvParam, operators::DepthwiseConvKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
using framework::OperatorWithKernel<DeviceType, ConvParam, operators::DepthwiseConvKernel<DeviceType, T>>::OperatorWithKernel;
: framework::OperatorWithKernel<
DeviceType, ConvParam,
operators::DepthwiseConvKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, ConvParam,
operators::DepthwiseConvKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
private:
......
......@@ -25,16 +25,22 @@ namespace paddle_mobile {
namespace operators {
using std::string;
template <typename DeviceType, typename T>
class ElementwiseAddOp : public framework::OperatorWithKernel<DeviceType, ElementwiseAddParam, operators::ElementwiseAddKernel<DeviceType, T>> {
class ElementwiseAddOp : public framework::OperatorWithKernel<
DeviceType, ElementwiseAddParam,
operators::ElementwiseAddKernel<DeviceType, T>> {
public:
ElementwiseAddOp(const string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, ElementwiseAddParam, operators::ElementwiseAddKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
using framework::OperatorWithKernel<DeviceType, ElementwiseAddParam, operators::ElementwiseAddKernel<DeviceType, T>>::OperatorWithKernel;
: framework::OperatorWithKernel<
DeviceType, ElementwiseAddParam,
operators::ElementwiseAddKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, ElementwiseAddParam,
operators::ElementwiseAddKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -47,16 +47,21 @@ class FusionConvAddMatcher : public framework::FusionOpMatcher {
};
template <typename DeviceType, typename T>
class FushionConvAddOp : public framework::OperatorWithKernel<DeviceType, FushionConvAddParam, operators::ConvAddKernel<DeviceType, T>> {
class FushionConvAddOp : public framework::OperatorWithKernel<
DeviceType, FushionConvAddParam,
operators::ConvAddKernel<DeviceType, T>> {
public:
FushionConvAddOp(const string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, FushionConvAddParam, operators::ConvAddKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, FushionConvAddParam,
operators::ConvAddKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, FushionConvAddParam, operators::ConvAddKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, FushionConvAddParam,
operators::ConvAddKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -45,16 +45,22 @@ class FusionFcMatcher : public framework::FusionOpMatcher {
};
template <typename DeviceType, typename T>
class FushionFcOp : public framework::OperatorWithKernel<DeviceType, FushionFcParam, operators::FushionFcKernel<DeviceType, T>> {
class FushionFcOp : public framework::OperatorWithKernel<
DeviceType, FushionFcParam,
operators::FushionFcKernel<DeviceType, T>> {
public:
FushionFcOp(const string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, FushionFcParam, operators::FushionFcKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
using framework::OperatorWithKernel<DeviceType, FushionFcParam, operators::FushionFcKernel<DeviceType, T>>::OperatorWithKernel;
: framework::OperatorWithKernel<
DeviceType, FushionFcParam,
operators::FushionFcKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, FushionFcParam,
operators::FushionFcKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -61,7 +61,7 @@ void BatchNormKernel<CPU, float>::Compute(const BatchNormParam &param) const {
/// std = (var + epsilon).sqrt();
/// inv_std = 1 / std;
for (int i = 0; i < C * 4; i += 4) {
int index = i/4;
int index = i / 4;
inv_std_ptr[i] =
1 / static_cast<float>(pow((variance_ptr[index] + epsilon), 0.5));
inv_std_ptr[i + 1] = inv_std_ptr[i];
......
......@@ -21,8 +21,8 @@ namespace operators {
template <>
void ConvKernel<GPU_MALI, float>::Compute(const ConvParam &param) const {
// ArmConvImplement imp;
// imp.Compute(param);
// ArmConvImplement imp;
// imp.Compute(param);
}
template class ConvKernel<GPU_MALI, float>;
......
......@@ -25,16 +25,21 @@ namespace paddle_mobile {
namespace operators {
using std::string;
template <typename DeviceType, typename T>
class LrnOp : public framework::OperatorWithKernel<DeviceType, LrnParam, operators::LrnKernel<DeviceType, T>> {
class LrnOp : public framework::OperatorWithKernel<
DeviceType, LrnParam, operators::LrnKernel<DeviceType, T>> {
public:
LrnOp(const string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, LrnParam, operators::LrnKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, LrnParam,
operators::LrnKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, LrnParam, operators::LrnKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, LrnParam,
operators::LrnKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
};
......
......@@ -25,15 +25,19 @@ namespace paddle_mobile {
namespace operators {
template <typename DeviceType, typename T>
class MulOp : public framework::OperatorWithKernel<DeviceType, MulParam, operators::MulKernel<DeviceType, T>> {
class MulOp : public framework::OperatorWithKernel<
DeviceType, MulParam, operators::MulKernel<DeviceType, T>> {
public:
MulOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, MulParam, operators::MulKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, MulParam,
operators::MulKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, MulParam, operators::MulKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, MulParam,
operators::MulKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -28,16 +28,22 @@ namespace operators {
using paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class MultiClassNMSOp : public framework::OperatorWithKernel<DeviceType, MultiClassNMSParam, operators::MultiClassNMSKernel<DeviceType, T>> {
class MultiClassNMSOp : public framework::OperatorWithKernel<
DeviceType, MultiClassNMSParam,
operators::MultiClassNMSKernel<DeviceType, T>> {
public:
MultiClassNMSOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, MultiClassNMSParam, operators::MultiClassNMSKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
using framework::OperatorWithKernel<DeviceType, MultiClassNMSParam, operators::MultiClassNMSKernel<DeviceType, T>>::OperatorWithKernel;
: framework::OperatorWithKernel<
DeviceType, MultiClassNMSParam,
operators::MultiClassNMSKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, MultiClassNMSParam,
operators::MultiClassNMSKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -29,13 +29,18 @@ using framework::OperatorWithKernel;
using framework::Scope;
using std::string;
template <typename DeviceType, typename T>
class PoolOp : public OperatorWithKernel<DeviceType, PoolParam, operators::PoolKernel<DeviceType, T>> {
class PoolOp : public OperatorWithKernel<DeviceType, PoolParam,
operators::PoolKernel<DeviceType, T>> {
public:
PoolOp(const string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const AttributeMap &attrs,
std::shared_ptr<Scope> scope)
: OperatorWithKernel<DeviceType, PoolParam, operators::PoolKernel<DeviceType, T>>(type, inputs, outputs, attrs, scope) {}
using OperatorWithKernel<DeviceType, PoolParam, operators::PoolKernel<DeviceType, T>>::OperatorWithKernel;
: OperatorWithKernel<DeviceType, PoolParam,
operators::PoolKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using OperatorWithKernel<
DeviceType, PoolParam,
operators::PoolKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
private:
......
......@@ -28,16 +28,21 @@ namespace operators {
using paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class PriorBoxOp : public framework::OperatorWithKernel<DeviceType, PriorBoxParam, operators::PriorBoxKernel<DeviceType, T>> {
class PriorBoxOp
: public framework::OperatorWithKernel<
DeviceType, PriorBoxParam, operators::PriorBoxKernel<DeviceType, T>> {
public:
PriorBoxOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, PriorBoxParam, operators::PriorBoxKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, PriorBoxParam,
operators::PriorBoxKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, PriorBoxParam, operators::PriorBoxKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, PriorBoxParam,
operators::PriorBoxKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -28,7 +28,9 @@ namespace operators {
using paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class ReluOp : public framework::OperatorWithKernel<DeviceType, ReluParam, operators::ReluKernel<DeviceType, T>> {
class ReluOp
: public framework::OperatorWithKernel<
DeviceType, ReluParam, operators::ReluKernel<DeviceType, T>> {
public:
/*
* @b op 的实例化方法, 需要调用父类的实例化方法, 以及实例化自己的参数结构体
......@@ -36,10 +38,13 @@ class ReluOp : public framework::OperatorWithKernel<DeviceType, ReluParam, opera
ReluOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs, const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, ReluParam, operators::ReluKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, ReluParam,
operators::ReluKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, ReluParam, operators::ReluKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, ReluParam,
operators::ReluKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -28,16 +28,21 @@ namespace operators {
using paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class ReshapeOp : public framework::OperatorWithKernel<DeviceType, ReshapeParam, operators::ReshapeKernel<DeviceType, T>> {
class ReshapeOp
: public framework::OperatorWithKernel<
DeviceType, ReshapeParam, operators::ReshapeKernel<DeviceType, T>> {
public:
ReshapeOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, ReshapeParam, operators::ReshapeKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, ReshapeParam,
operators::ReshapeKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, ReshapeParam, operators::ReshapeKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, ReshapeParam,
operators::ReshapeKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
protected:
......
......@@ -25,16 +25,21 @@ limitations under the License. */
namespace paddle_mobile {
namespace operators {
template <typename DeviceType, typename T>
class SigmoidOp : public framework::OperatorWithKernel<DeviceType, SigmoidParam, operators::SigmoidKernel<DeviceType, T>> {
class SigmoidOp
: public framework::OperatorWithKernel<
DeviceType, SigmoidParam, operators::SigmoidKernel<DeviceType, T>> {
public:
SigmoidOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, SigmoidParam, operators::SigmoidKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, SigmoidParam,
operators::SigmoidKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, SigmoidParam, operators::SigmoidKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, SigmoidParam,
operators::SigmoidKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
};
......
......@@ -25,16 +25,21 @@ limitations under the License. */
namespace paddle_mobile {
namespace operators {
template <typename DeviceType, typename T>
class SoftmaxOp : public framework::OperatorWithKernel<DeviceType, SoftmaxParam, operators::SoftmaxKernel<DeviceType, T>> {
class SoftmaxOp
: public framework::OperatorWithKernel<
DeviceType, SoftmaxParam, operators::SoftmaxKernel<DeviceType, T>> {
public:
SoftmaxOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, SoftmaxParam, operators::SoftmaxKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
: framework::OperatorWithKernel<DeviceType, SoftmaxParam,
operators::SoftmaxKernel<DeviceType, T>>(
type, inputs, outputs, attrs, scope) {}
using framework::OperatorWithKernel<DeviceType, SoftmaxParam, operators::SoftmaxKernel<DeviceType, T>>::OperatorWithKernel;
using framework::OperatorWithKernel<
DeviceType, SoftmaxParam,
operators::SoftmaxKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
......
......@@ -28,16 +28,22 @@ namespace operators {
using paddle_mobile::framework::Tensor;
template <typename DeviceType, typename T>
class TransposeOp : public framework::OperatorWithKernel<DeviceType, TransposeParam, operators::TransposeKernel<DeviceType, T>> {
class TransposeOp : public framework::OperatorWithKernel<
DeviceType, TransposeParam,
operators::TransposeKernel<DeviceType, T>> {
public:
TransposeOp(const std::string &type, const VariableNameMap &inputs,
const VariableNameMap &outputs,
const framework::AttributeMap &attrs,
std::shared_ptr<framework::Scope> scope)
: framework::OperatorWithKernel<DeviceType, TransposeParam, operators::TransposeKernel<DeviceType, T>>(type, inputs, outputs, attrs,
scope) {}
using framework::OperatorWithKernel<DeviceType, TransposeParam, operators::TransposeKernel<DeviceType, T>>::OperatorWithKernel;
: framework::OperatorWithKernel<
DeviceType, TransposeParam,
operators::TransposeKernel<DeviceType, T>>(type, inputs, outputs,
attrs, scope) {}
using framework::OperatorWithKernel<
DeviceType, TransposeParam,
operators::TransposeKernel<DeviceType, T>>::OperatorWithKernel;
void InferShape() const override;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册