paddle1.6.2 fluid.layers.mul训练的时候报错
Created by: suytingwan
该问题搜索过https://github.com/PaddlePaddle/Paddle/issues/17955 https://github.com/PaddlePaddle/Paddle/issues/8283 目前paddle版本1.6.2,因为其他的函数依赖需要用这个版本,静态图矩阵乘法出现如下问题,求解决方案
Python Call Stacks (More useful to users):
File "/home/disk2/suying02/paddle-release/python-gcc482-paddle/lib/python2.7/site-packages/paddle/fluid/framework.py", line 2488, in append_op attrs=kwargs.get("attrs", None)) File "/home/disk2/suying02/paddle-release/python-gcc482-paddle/lib/python2.7/site-packages/paddle/fluid/layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "/home/disk2/suying02/paddle-release/python-gcc482-paddle/lib/python2.7/site-packages/paddle/fluid/layers/nn.py", line 15241, in mul outputs={"Out": out}) File "/home/disk2/suying02/paddle_arcface_slicefc/losses/focal.py", line 135, in net shard_fc = fluid.layers.mul(x_all, weight) File "train.py", line 67, in build_program loss, acc1, acc5, shard_fc = LOSS.net(outputs, label) File "train.py", line 176, in train strategy=strategy File "train.py", line 287, in train(args)
Error Message Summary:
Error: Tensor's dims_ is out of bound. Call Tensor::mutable_data first to re-allocate memory. or maybe the required data-type mismatches the data already stored. [Hint: Expected numel() * SizeOfType(type()) <= memory_size(), but received numel() * SizeOfType(type()):1371872 > memory_size():4.] at (/paddle/paddle/fluid/framework/tensor.cc:28) [operator < mul_grad > error] @ 0x7ff1ae6285b7 std::__future_base::_State_base::_M_do_set() @ 0x7ff1f217f973 __GI___pthread_once @ 0x7ff1b0b7ec22 _ZNSt13__future_base11_Task_stateISt5_BindIFZN6paddle9framework7details28FastThreadedSSAGraphExecutor10RunOpAsyncEPSt13unordered_mapIPNS4_12OpHandleBaseESt6atomicIiESt4hashIS8_ESt8equal_toIS8_ESaISt4pairIKS8_SA_EEES8_RKSt10shared_ptrINS3_13BlockingQueueImEEEEUlvE_vEESaIiEFvvEE6_M_runEv @ 0x7ff1ae629d74 _ZZN10ThreadPoolC1EmENKUlvE_clEv @ 0x7ff1e162d8a0 execute_native_thread_routine @ 0x7ff1f217a1c3 start_thread @ 0x7ff1f17a212d __clone @ (nil) (unknown)