“0eda9630af48a42e9d89cf39905ad25e2966f9b4”上不存在“...machine_reading_comprehension/utils/get_vocab.py”
提交 9c83b5a2 编写于 作者: K Kavya Srinet

Fixed uniform_random_op.cc

上级 07064355
...@@ -66,7 +66,7 @@ class UniformRandomOp : public framework::OperatorWithKernel { ...@@ -66,7 +66,7 @@ class UniformRandomOp : public framework::OperatorWithKernel {
framework::OpKernelType GetExpectedKernelType( framework::OpKernelType GetExpectedKernelType(
const framework::ExecutionContext& ctx) const override { const framework::ExecutionContext& ctx) const override {
return framework::OpKernelType( return framework::OpKernelType(
static_cast<framework::proto::DataType>(ctx.Attr<int>("dtype")), static_cast<framework::proto::VarType::Type>(ctx.Attr<int>("dtype")),
ctx.GetPlace()); ctx.GetPlace());
} }
}; };
...@@ -79,7 +79,7 @@ class UniformRandomOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -79,7 +79,7 @@ class UniformRandomOpMaker : public framework::OpProtoAndCheckerMaker {
AddComment(R"DOC( AddComment(R"DOC(
Uniform random operator. Uniform random operator.
This operator initializes a tensor with random values sampled from a This operator initializes a tensor with random values sampled from a
uniform distribution. uniform distribution.
)DOC"); )DOC");
...@@ -99,7 +99,7 @@ uniform distribution. ...@@ -99,7 +99,7 @@ uniform distribution.
"0 means use a seed generated by the system.") "0 means use a seed generated by the system.")
.SetDefault(0); .SetDefault(0);
AddAttr<int>("dtype", "(int, default 5(FP32)) Output tensor data type") AddAttr<int>("dtype", "(int, default 5(FP32)) Output tensor data type")
.SetDefault(framework::proto::DataType::FP32); .SetDefault(framework::proto::VarType::Type::FP32);
} }
}; };
} // namespace operators } // namespace operators
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册