Paddle 调用1.6.2版本fluid自带rnn模块,报tensor未初始化问题

ve7v8dk2  于 2022-10-20  发布在  其他
关注(0)|答案(2)|浏览(380)
  • 版本、环境信息:

   1)PaddlePaddle版本:1.6.2
   2)CPU:本地训练
   3)系统环境:Python2.7

  • 训练信息

   1)单机

  • 问题描述:

调用fluid自带rnn模块,出现tensor未初始化问题。已经检查过input数据,已经正常初始化。打印过中间变量发现,调用StaticRNN类后,进入recurrent op抛出异常。

Error Message Summary:

Error: Tensor not initialized yet when Tensor::type() is called.
[Hint: holder_ should not be null.] at (/paddle/paddle/fluid/framework/tensor.h:139)

r1zhe5dt

r1zhe5dt1#

Error: Tensor not initialized yet when Tensor::type() is called.
[Hint: holder_ should not be null.] at (/paddle/paddle/fluid/framework/tensor.h:139)

请问这个错误是因为打印中间变量这个操作导致的吗?不打印中间变量是不是就不会报错?

esyap4oy

esyap4oy2#

Error: Tensor not initialized yet when Tensor::type() is called.
[Hint: holder_ should not be null.] at (/paddle/paddle/fluid/framework/tensor.h:139)

请问这个错误是因为打印中间变量这个操作导致的吗?不打印中间变量是不是就不会报错?

不是的,即使不打印中间变量,也是同样的错误。联系paddle同学排查,只能定位到打印的错误是static_rnn_0.tmp_0,但是,中间通过中间过程打印来看,static_rnn_0.tmp_0在前面已经被打印输出过。

相关问题