diff --git a/paddle/operators/random_op.h b/paddle/operators/random_op.h index bee6cc9cbd567ac9da764ba7549d462b3d2d3d71..3eeb1f87c868e7eca81b36183f3f8da09b406b58 100644 --- a/paddle/operators/random_op.h +++ b/paddle/operators/random_op.h @@ -15,6 +15,21 @@ bool Gaussian(DeviceContext& ctx, const T& std, const T& seed); +template +bool Gaussian(platform::CPUDeviceContext& ctx, + framework::Tensor* output, + const int size, + const T& mean, + const T& std, + const T& seed); +template +bool Gaussian(platform::CUDADeviceContext& ctx, + framework::Tensor* output, + const int size, + const T& mean, + const T& std, + const T& seed); + template class RandomOpKernel : public framework::OpKernel { public: