本地编译paddle fluid cpu版本时出错
[ 37%] Building CXX object paddle/fluid/operators/CMakeFiles/hierarchical_sigmoid_op.dir/hierarchical_sigmoid_op.cc.o In file included from /home/work/liuyaping/Paddle/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/Tensor:152:0, from /home/work/liuyaping/Paddle/paddle/fluid/platform/device_context.h:34, from /home/work/liuyaping/Paddle/paddle/fluid/framework/tensor.h:26, from /home/work/liuyaping/Paddle/paddle/fluid/framework/mixed_vector.h:22, from /home/work/liuyaping/Paddle/paddle/fluid/framework/lod_tensor.h:28, from /home/work/liuyaping/Paddle/paddle/fluid/framework/operator.h:28, from /home/work/liuyaping/Paddle/paddle/fluid/framework/grad_op_desc_maker.h:21, from /home/work/liuyaping/Paddle/paddle/fluid/framework/details/op_registry.h:20, from /home/work/liuyaping/Paddle/paddle/fluid/framework/op_registry.h:28, from /home/work/liuyaping/Paddle/paddle/fluid/operators/hierarchical_sigmoid_op.h:18, from /home/work/liuyaping/Paddle/paddle/fluid/operators/hierarchical_sigmoid_op.cc:15: /home/work/liuyaping/Paddle/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h: In instantiation of ‘static void Eigen::internal::TensorExecutor<Expression, Eigen::DefaultDevice, Vectorizable, true>::run(const Expression&, const Eigen::DefaultDevice&) [with Expression = const Eigen::TensorAssignOp<Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long int>, 0, Eigen::MakePointer>, const Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_sum_op<float, float>, const Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long int>, 0, Eigen::MakePointer>, const Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long int>, 0, Eigen::MakePointer> > >; bool Vectorizable = true]’: /home/work/liuyaping/Paddle/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorDevice.h:35:79: required from ‘Eigen::TensorDevice<ExpressionType, DeviceType>& Eigen::TensorDevice<ExpressionType, DeviceType>::operator=(const OtherDerived&) [with OtherDerived = Eigen::TensorCwiseBinaryOp<Eigen::internal::scalar_sum_op<float, float>, const Eigen::TensorMap<Eigen::Tensor<float, 2, 1, long int>, 0, Eigen::MakePointer>, const Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long int>, 0, Eigen::MakePointer> >; ExpressionType = Eigen::TensorMap<Eigen::Tensor<float, 1, 1, long int>, 0, Eigen::MakePointer>; DeviceType = Eigen::DefaultDevice]’ /home/work/liuyaping/Paddle/paddle/fluid/operators/hierarchical_sigmoid_op.h:79:27: required from ‘void paddle::operators::HierarchicalSigmoidOpKernel<DeviceContext, T>::Compute(const paddle::framework::ExecutionContext&) const [with DeviceContext = paddle::platform::CPUDeviceContext; T = float]’ /home/work/liuyaping/Paddle/paddle/fluid/framework/op_registry.h:102:11: required from ‘paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes ...>::operator()(const char*, const char*) const [with PlaceType = paddle::platform::CPUPlace; long unsigned int I = 0ul; KernelTypes = {paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, float>, paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, double>}]::__lambda21’ /home/work/liuyaping/Paddle/paddle/fluid/framework/op_registry.h:101:33: required from ‘struct paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes ...>::operator()(const char*, const char*) const [with PlaceType = paddle::platform::CPUPlace; long unsigned int I = 0ul; KernelTypes = {paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, float>, paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, double>}]::__lambda21’ /home/work/liuyaping/Paddle/paddle/fluid/framework/op_registry.h:103:10: required from ‘void paddle::framework::OpKernelRegistrarFunctor<PlaceType, false, I, KernelTypes ...>::operator()(const char*, const char*) const [with PlaceType = paddle::platform::CPUPlace; long unsigned int I = 0ul; KernelTypes = {paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, float>, paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, double>}]’ /home/work/liuyaping/Paddle/paddle/fluid/framework/op_registry.h:123:31: required from ‘paddle::framework::OpKernelRegistrar<PlaceType, KernelType>::OpKernelRegistrar(const char*, const char*) [with PlaceType = paddle::platform::CPUPlace; KernelType = {paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, float>, paddle::operators::HierarchicalSigmoidOpKernel<paddle::platform::CPUDeviceContext, double>}]’ /home/work/liuyaping/Paddle/paddle/fluid/operators/hierarchical_sigmoid_op.cc:157:1: required from here /home/work/liuyaping/Paddle/third_party/eigen3/src/extern_eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorExecutor.h:143:53: error: invalid initialization of reference of type ‘const Dimensions& {aka const Eigen::DSizes<long int, 1>&}’ from expression of type ‘const Dimensions {aka const Eigen::DSizes<long int, 2>}’
请先说明你编译的版本(是否develop分支)?在本地编译还是docker镜像里编译,cmake命令等。
另外,是否mkdir build; cd build进入build目录编译。
release0.14.0 本地编译(非docker镜像) 另外:未mkdir build; cd build进入build目录编译。
http://www.paddlepaddle.org/documentation/docs/zh/0.14.0/new_docs/beginners_guide/install/install_doc.html#permalink-6--paddlepaddle
里面第8点,需要mkdir build; cd build进入build目录编译。

即使新建build目录,根据8. cmake .. -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF
生成的makefile还是在build/../ ,也就是原始目录 重新make,还是失败
cd Paddle # 下载目录
mkdir build
cd build
cmake .. -DWITH_FLUID_ONLY=ON -DWITH_GPU=OFF -DWITH_TESTING=OFF
make
生成的makefile还是在build/../ ,也就是原始目录
弄一个干净目录,重新来一遍。
您好,此issue在近一个月内暂无更新,我们将于今天内关闭。若在关闭后您仍需跟进提问,可重新开启此问题, 我们将在24小时内回复您。因关闭带来的不便我们深表歉意,请您谅解~感谢您对PaddlePaddle的支持!