[DDPG]PaddleCheckError 提示变量形状不匹配,具体报错如下
Created by: zbp-xxxp
[07-08 00:22:31 MainThread @logger.py:224] Argv: D:/Envs/SmartCar/DDPG/train.py C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\importlib_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject return f(*args, **kwds) C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\importlib_bootstrap.py:219: RuntimeWarning: numpy.ufunc size changed, may indicate binary incompatibility. Expected 192 from C header, got 216 from PyObject return f(*args, **kwds) C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32 warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
[07-08 00:22:42 MainThread @machine_info.py:88] Cannot find available GPU devices, using CPU now. [07-08 00:22:43 MainThread @machine_info.py:88] Cannot find available GPU devices, using CPU now. [07-08 00:22:43 MainThread @machine_info.py:88] Cannot find available GPU devices, using CPU now. Track generation: 1236..1549 -> 313-tiles track C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\gym\envs\box2d\car_racing.py:407: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead arr = np.fromstring(image_data.get_data(), dtype=np.uint8, sep='') C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\executor.py:774: UserWarning: The following exception is not an EOF exception. "The following exception is not an EOF exception.") Traceback (most recent call last): File "D:/Envs/SmartCar/DDPG/train.py", line 93, in run_episode(agent, env, rpm) File "D:/Envs/SmartCar/DDPG/train.py", line 43, in run_episode agent.learn(batch_obs, batch_action, batch_reward, batch_next_obs,batch_done) File "D:\Envs\SmartCar\DDPG\Agent.py", line 55, in learn self.learn_program, feed=feed, fetch_list=[self.critic_cost])[0] File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\executor.py", line 775, in run six.reraise(*sys.exc_info()) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\six.py", line 693, in reraise raise value File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\executor.py", line 770, in run use_program_cache=use_program_cache) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\executor.py", line 817, in _run_impl use_program_cache=use_program_cache) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\executor.py", line 894, in _run_program fetch_var_name) paddle.fluid.core_noavx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
Windows not support stack backtrace yet.
Python Call Stacks (More useful to users):
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\framework.py", line 2459, in append_op attrs=kwargs.get("attrs", None)) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\paddle\fluid\layers\nn.py", line 384, in fc "y_num_col_dims": 1}) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\parl\core\fluid\layers\layer_wrappers.py", line 161, in call act=act) File "D:\Envs\SmartCar\DDPG\Model.py", line 41, in value Q = self.fc2(concat) File "D:\Envs\SmartCar\DDPG\Model.py", line 13, in value return self.critic_model.value(obs, act) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\parl\algorithms\fluid\ddpg.py", line 84, in _critic_learn Q = self.model.value(obs, action) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\parl\algorithms\fluid\ddpg.py", line 65, in learn terminal) File "D:\Envs\SmartCar\DDPG\Agent.py", line 36, in build_program terminal) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37\lib\site-packages\parl\core\fluid\agent.py", line 80, in init self.build_program() File "D:\Envs\SmartCar\DDPG\Agent.py", line 12, in init super(Agent, self).init(algorithm) File "D:/Envs/SmartCar/DDPG/train.py", line 87, in agent = Agent(algorithm, obs_dim, act_dim)
Error Message Summary:
PaddleCheckError: Expected x_mat_dims[1] == y_mat_dims[0], but received x_mat_dims[1]:31 != y_mat_dims[0]:33. ShapeError: After flatten the input tensor X and Y to 2-D dimensions matrix X1 and Y1, the matrix X1's width must be equal with matrix Y1's height. But received X's shape = [16, 31], X1's shape = [16, 31], X1's width = 31; Y's shape = [33, 1], Y1's shape = [33, 1], Y1's height = 33. at [D:\paddle-tiny-release-liujinquan\1.6.1-tiny\Paddle\paddle\fluid\operators\mul_op.cc:70] [operator < mul > error]
我的想法是用DDPG算法解决CarRacing-v0环境,但是报了上面的错误,不知道怎么去解决这个问题 改了一处地方又会有新的类似报错,求助!