Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • PARL
  • Issue
  • #338

P
PARL
  • 项目概览

PaddlePaddle / PARL

通知 68
Star 3
Fork 0
  • 代码
    • 文件
    • 提交
    • 分支
    • Tags
    • 贡献者
    • 分支图
    • Diff
  • Issue 18
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 3
  • Wiki 0
    • Wiki
  • 分析
    • 仓库
    • DevOps
  • 项目成员
  • Pages
P
PARL
  • 项目概览
    • 项目概览
    • 详情
    • 发布
  • 仓库
    • 仓库
    • 文件
    • 提交
    • 分支
    • 标签
    • 贡献者
    • 分支图
    • 比较
  • Issue 18
    • Issue 18
    • 列表
    • 看板
    • 标记
    • 里程碑
  • 合并请求 3
    • 合并请求 3
  • Pages
  • 分析
    • 分析
    • 仓库分析
    • DevOps
  • Wiki 0
    • Wiki
  • 成员
    • 成员
  • 收起侧边栏
  • 动态
  • 分支图
  • 创建新Issue
  • 提交
  • Issue看板
已关闭
开放中
Opened 7月 11, 2020 by saxon_zh@saxon_zhGuest

[TypeError] fc() got an unexpected keyword argument 'is_test'

Created by: zbp-xxxp

the output is : [07-11 17:24:48 MainThread @logger.py:95] WRN Cannot find available GPU devices, using CPU now. ---------------------------------------------------------------------------TypeError Traceback (most recent call last) in 108 109 if name == 'main': --> 110 main() in main() 81 model = Model(act_dim) 82 algorithm = DDPG(model, gamma=GAMMA, tau=TAU, actor_lr=ACTOR_LR, critic_lr=CRITIC_LR) ---> 83 agent = Agent(algorithm, obs_dim, act_dim) 84 85 agent.restore(r'model/pre_training/model_number_60.ckpt') in init(self, algorithm, obs_dim, act_dim) 10 self.obs_dim = obs_dim 11 self.act_dim = act_dim ---> 12 super(Agent, self).init(algorithm) 13 14 # 注意:最开始先同步self.model和self.target_model的参数. /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/core/fluid/agent.py in init(self, algorithm, gpu_id) 85 self.gpu_id = 0 if machine_info.is_gpu_available() else -1 86 ---> 87 self.build_program() 88 89 self.place = fluid.CUDAPlace( in build_program(self) 22 obs = layers.data( 23 name='obs', shape=[self.obs_dim], dtype='float32') ---> 24 self.pred_act = self.alg.predict(obs) 25 26 with fluid.program_guard(self.learn_program): /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/algorithms/fluid/ddpg.py in predict(self, obs) 76 """ use actor model of self.model to predict the action 77 """ ---> 78 return self.model.policy(obs) 79 80 @deprecated( in policy(self, obs) 8 9 def policy(self, obs): ---> 10 return self.actor_model.policy(obs) 11 12 def value(self, obs, act): in policy(self, obs) 24 25 def policy(self, obs): ---> 26 out = self.fc1(obs) 27 out = self.fc2(out) 28 return out /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/parl/core/fluid/layers/layer_wrappers.py in call(self, input, is_test) 154 bias_attr=self.attr_holder.bias_attr, 155 act=act, --> 156 is_test=is_test) 157 158 return FC_() TypeError: fc() got an unexpected keyword argument 'is_test'

How to solve the error? I would appreicate it if you could give me some suggestions.

指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/PARL#338
渝ICP备2023009037号

京公网安备11010502055752号

网络110报警服务 Powered by GitLab CE v13.7
开源知识
Git 入门 Pro Git 电子书 在线学 Git
Markdown 基础入门 IT 技术知识开源图谱
帮助
使用手册 反馈建议 博客
《GitCode 隐私声明》 《GitCode 服务条款》 关于GitCode
Powered by GitLab CE v13.7