提交 30a47fe8 编写于 作者: D dongzhihong

"link pybind11"

上级 32c15a29
......@@ -71,10 +71,10 @@ The eqution : Out = Random(Shape=(d0, d1, ...), Dtype, mean, std)
} // namespace operators
} // namespace paddle
REGISTER_OP(random_op,
REGISTER_OP(random,
paddle::operators::RandomOp,
paddle::operators::RandomOpMaker);
typedef paddle::operators::RandomOpKernel<paddle::platform::CPUPlace, float>
RandomOpKernel_CPU_float;
REGISTER_OP_CPU_KERNEL(random_op, RandomOpKernel_CPU_float);
REGISTER_OP_CPU_KERNEL(random, RandomOpKernel_CPU_float);
......@@ -17,4 +17,4 @@ bool Gaussian(platform::CUDADeviceContext &ctx, framework::Tensor* output,
typedef paddle::operators::RandomOpKernel<paddle::platform::GPUPlace, float>
RandomOpKernel_GPU_float;
REGISTER_OP_GPU_KERNEL(random_op, RandomOpKernel_GPU_float);
\ No newline at end of file
REGISTER_OP_GPU_KERNEL(random, RandomOpKernel_GPU_float);
\ No newline at end of file
cc_library(paddle_pybind SHARED SRCS pybind.cc DEPS pybind python
add_op fc_op sgd_op cross_entropy_op)
add_op fc_op sgd_op cross_entropy_op random_op)
......@@ -36,7 +36,7 @@ USE_OP(mul);
USE_OP(sigmoid);
USE_OP(softmax);
USE_OP(rowwise_add);
USE_OP(random_op);
USE_OP(random);
template <typename ClassType>
void ExposeOperator(ClassType& m) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册