提交 68d435ca 编写于 作者: A Abhinav Arora

Fix operator.cc

上级 efc517f3
...@@ -569,7 +569,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope, ...@@ -569,7 +569,7 @@ void OperatorWithKernel::RunImpl(const Scope& scope,
} }
} }
proto::DataType OperatorWithKernel::IndicateDataType( proto::VarType::Type OperatorWithKernel::IndicateDataType(
const ExecutionContext& ctx) const { const ExecutionContext& ctx) const {
auto& scope = ctx.scope(); auto& scope = ctx.scope();
int data_type = -1; int data_type = -1;
...@@ -595,7 +595,7 @@ proto::DataType OperatorWithKernel::IndicateDataType( ...@@ -595,7 +595,7 @@ proto::DataType OperatorWithKernel::IndicateDataType(
} }
} }
PADDLE_ENFORCE(data_type != -1, "DataType should be indicated by input"); PADDLE_ENFORCE(data_type != -1, "DataType should be indicated by input");
return static_cast<proto::DataType>(data_type); return static_cast<proto::VarType::Type>(data_type);
} }
OpKernelType OperatorWithKernel::GetExpectedKernelType( OpKernelType OperatorWithKernel::GetExpectedKernelType(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册