"link pybind11"

revert-3824-remove_grad_op_type
dongzhihong 8 years ago
parent 32c15a2919
commit 30a47fe8a3

@ -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);
REGISTER_OP_GPU_KERNEL(random, RandomOpKernel_GPU_float);

@ -1,2 +1,2 @@
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) {

Loading…
Cancel
Save