PaddleCheckError: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1. The Tensor in the mul Op's Input Variable X(image) is not initialized. at [/paddle/paddle/fluid/framework/operator.cc:1166
Created by: ooiikaka1
-PaddlePaddle 1.6.1 -CPU: i-8700k -GPU: 1070 -OS ubuntu 16.04
运行下面打代码:
在百度云中都可以运行,本地无法运行
import paddle.fluid as fluid
定义两个张量
x1 = fluid.layers.fill_constant(shape=[2, 2], value=1, dtype='int64') x2 = fluid.layers.fill_constant(shape=[2, 2], value=1, dtype='int64')
将两个张量求和
y1 = fluid.layers.sum(x=[x1, x2])
创建一个使用CPU的解释器
place = fluid.CPUPlace() exe = fluid.executor.Executor(place)
进行参数初始化
exe.run(fluid.default_startup_program())
进行运算,并把y的结果输出
result = exe.run(program=fluid.default_main_program(), fetch_list=[y1]) print(result)
报错
Error Message Summary:
PaddleCheckError: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1. The Tensor in the mul Op's Input Variable X(image) is not initialized. at [/paddle/paddle/fluid/framework/operator.cc:1166] [operator < mul > error]