ydchen9
ydchen9
比如下面这些代码,来自如下链接代码中的182行:https://github.com/PaddlePaddle/PARL/blob/develop/parl/algorithms/fluid/ppo.py pg_ratio = layers.exp(logprob - old_logprob) clipped_pg_ratio = layers.clip(pg_ratio, 1 - self.epsilon, 1 + self.epsilon) surrogate_loss = layers.elementwise_min( advantages * pg_ratio, advantages * clipped_pg_ratio) loss = 0 - layers.reduce_mean(surrogate_loss)
代码如下: (代码文件 [test3.zip](https://github.com/PaddlePaddle/Paddle/files/4293810/test3.zip) ) `from __future__ import print_function import paddle.fluid as fluid import numpy def model(x): f1 = fluid.layers.fc(input=x, size=20, act="tanh") x_predict = fluid.layers.fc(input=f1, size=1) return x_predict train_program = fluid.Program()...
EnforceNotMetTraceback (most recent call last) in () 563 save_dirname=save_dirname, 564 model_filename=model_filename, --> 565 params_filename=params_filename) 566 # batch_infer(save_dirname) 567 # infer( in train(nn_type, save_dirname, model_filename, params_filename) 222 # optimizer = fluid.optimizer.Adam(learning_rate=fluid.layers.piecewise_decay(boundaries=boundaries,...
能否提供简要的实现思路,当然能具体点更好。感谢! 另,因为我使用的是python2.6,因此无法安装parl库。只能自己动手实现。
1)PaddlePaddle版本:根据官网给的安装语句安装的python -m pip install paddlepaddle -i https://pypi.tuna.tsinghua.edu.cn/simple 2)CPU:请提供CPU型号。这在安装之前测试过,显示AMD64,符合官网说的安装要求。 3)GPU:请提供GPU型号。无 4)系统环境:win7、Python版本:2.7.18 具体出现的错误如下:    请问paddle现在还能在python2.7上安装吗?
我的平台是:win7,` 64位,python2.7.18,paddle1.8.4。 建立了一个ParamAttr(name="fc_weight_I")名字之后,如何删除它?因为我在做循环训练模型的过程,每次循环时,都要进行build program, 这时会出现名字冲突的错误,但又不能不build program,因为模型的结构虽然一样,但图片的尺寸大小不同。  
Under Windows 7 system, python 2.7 and paddle 1.5.1. The following error occurred. 
I use the command as "pip install parl", and it shows that parl is successfully installed. But when I import parl, the error arises as follows:  How can I...