Skip to content

  • 体验新版
    • 正在加载...
  • 登录
  • PaddlePaddle
  • Paddle
  • Issue
  • #301

P
Paddle
  • 项目概览

PaddlePaddle / Paddle
大约 2 年 前同步成功

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

fc_layer的input采用list结构时,出现不和预期的现象,疑似offset敏感而不是使用name

Created by: CDDB

work的网络结构:

from paddle.trainer_config_helpers import *

is_predict = get_config_arg("is_predict", bool, False)
a_dim = 60
b_dim = 80
num_classes = 2

####################Data Configuration ##################
if not is_predict:
  data_dir='dna_data/'
  args = {'a_dim':a_dim, 'b_dim':b_dim, 'num_classes': num_classes}
  define_py_data_sources2(train_list=data_dir+"train.list",
                          test_list=data_dir+'test.list',
                          module='ei_fea_provider',
                          obj='processData',
                          args=args)

######################Algorithm Configuration #############
settings(
    batch_size = 500,
    learning_method = AdaDeltaOptimizer()
)
#######################Network Configuration #############
a_input = data_layer(name='a_fea', size=a_dim)
b_input = data_layer(name='b_fea', size=b_dim)
label = data_layer(name="label", size=num_classes)

a_hidden = fc_layer(input=a_input, size=256, act=ReluActivation())
b_hidden = fc_layer(input=b_input, size=256, act=ReluActivation())

**prediction = fc_layer(input=[a_hidden, b_hidden], size=num_classes, act=SoftmaxActivation())**
outputs(classification_cost(input=prediction,
                            label=label))

其中,调换prediction layer的input的顺序,就会出现check失败的情况。错误的一行配置 prediction = fc_layer(input=[b_hidden, a_hidden], size=num_classes, act=SoftmaxActivation())

错误log:

[INFO 2016-11-01 17:07:42,249 networks.py:1129] The output order is [__cost_0__]
I1101 17:07:42.251242  3502 Trainer.cpp:169] trainer mode: Normal
I1101 17:07:42.252277  3502 PyDataProvider2.cpp:219] loading dataprovider ei_fea_provider::processData
I1101 17:07:42.252609  3502 PyDataProvider2.cpp:219] loading dataprovider ei_fea_provider::processData
I1101 17:07:42.252691  3502 GradientMachine.cpp:134] Initing parameters..
I1101 17:07:42.255108  3502 GradientMachine.cpp:141] Init parameters done.
F1101 17:07:47.468036  3502 Matrix.cpp:2015] Check failed: a_col == b_row (80 vs. 60)
*** Check failure stack trace: ***
    @     0x7f918ba5852d  google::LogMessage::Fail()
    @     0x7f918ba5cc90  google::LogMessage::SendToLog()
    @     0x7f918ba59057  google::LogMessage::Flush()
    @     0x7f918ba592b6  google::LogMessageFatal::~LogMessageFatal()
    @           0x7eb2b9  paddle::CpuMatrix::mul()
    @           0x7f324b  paddle::CpuMatrix::mul()
    @           0x64b811  paddle::FullyConnectedLayer::forward()
    @           0x6c7bc6  paddle::NeuralNetwork::forward()
    @           0x57eebc  paddle::GradientMachine::forwardBackward()
    @           0x70f1e5  paddle::TrainerInternal::forwardBackwardBatch()
    @           0x710fe5  paddle::TrainerInternal::trainOneBatch()
    @           0x70a66a  paddle::Trainer::trainOnePass()
    @           0x70b553  paddle::Trainer::train()
    @           0x537794  main
    @       0x318ae1ecdd  (unknown)
    @           0x53faf5  (unknown)

paddle版本
PaddlePaddle 0.8.0b0, compiled with
    with_avx: ON
    with_gpu: OFF
    with_double: OFF
    with_python: ON
    with_rdma: OFF
    with_glog: ON
    with_gflags: ON
    with_metric_learning: OFF
    with_timer: OFF
    with_predict_sdk: OFF
指派人
分配到
无
里程碑
无
分配里程碑
工时统计
无
截止日期
无
标识: paddlepaddle/Paddle#301
渝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