当前位置:网站首页>paddle.fluild常量计算报错‘NoneType‘ object has no attribute ‘get_fetch_list‘
paddle.fluild常量计算报错‘NoneType‘ object has no attribute ‘get_fetch_list‘
2022-07-29 05:09:00 【晶格点阵】
错误来源:
《paddlepaddle Fluid深度学习入门与实》书籍中第一个示例:“PaddlePaddle常量的使用”
示例代码如下:
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])
place = fluid.CPUPlace()
exe = fluid.executor.Executor(place)
exe.run(fluid.default_startup_program())
result = exe.run(program=fluid.default_main_program(), fetch_list=[y1])
print(result)
if __name__ == '__main__':
pass运行报错如下:
C:\ProgramData\Anaconda3\lib\site-packages\paddle\fluid\executor.py:1279: UserWarning: There are no operators in the program to be executed. If you pass Program manually, please use fluid.program_guard to ensure the current Program is being used.
war边栏推荐
- 阿里云张新涛:异构计算为数字经济提供澎湃动力
- MySQL的基础概念+数据库系统结构+拓展延申+基础命令学习
- 直播预告:京东云DevOps与JFrog制品库的融合
- 研发效能|Kubernetes核心技术剖析和DevOps落地经验
- Complete ecological map of R & D Efficiency & selection of Devops tools
- Teardown's method of lifting the time limit
- Together with digital people, digital space and XR platform, Alibaba cloud and its partners jointly build a "new vision"
- 2022数学建模竞赛暑期培训讲座——最优化方法:目标规划
- 365天挑战LeetCode1000题——Day 039 完全二叉树插入器 + 寻找峰值 II + 快照数组
- Best practices for elastic computing in the game industry
猜你喜欢

京东云分布式链路追踪在金融场景的最佳实践

一维数组练习

数千个数据库、遍布全国的物理机,京东物流全量上云实录 | 卓越技术团队访谈录

365天挑战LeetCode1000题——Day 040 设计跳表 + 避免洪水泛滥 + 查找大小为 M 的最新分组 + 销售价值减少的颜色球

【C语言系列】—三种方法模拟实现strlen库函数的方法

千人规模互联网公司研发效能成功之路

365天挑战LeetCode1000题——Day 035 每日一题 + 二分查找 13

平行云CEO 李岩:CloudXR ,开启通往元宇宙的通道

In depth analysis of common cross end technology stacks of app

365天挑战LeetCode1000题——Day 042 数组序号转换 + 相对名次 离散化处理
随机推荐
Live broadcast preview | how to save 30% labor cost and shorten 80% trademark processing cycle?
365 day challenge leetcode 1000 questions - day 042 array sequence number conversion + relative ranking discretization processing
Occt learning 001 - Introduction
适创科技以云仿真平台,支持“中国智造”升级
为啥谷歌的内部工具不适合你?
QML control: combobox
Live broadcast preview | how to improve enterprise immunity through "intelligent edge security"?
【C语言系列】— 打印100~200之间的素数
英伟达周锡健:设计到数字营销的最后一公里
研发效能|Kubernetes核心技术剖析和DevOps落地经验
Time complexity and space complexity
With cloud simulation platform, Shichuang technology supports the upgrading of "China smart manufacturing"
第一周总结
省市区三级联动(简单又完美)
NVIDIA Zhou Xijian: the last mile from design to digital marketing
Occt learning 002 - environment construction
京东云分布式链路追踪在金融场景的最佳实践
【赛事预告】云上开发,高效智能——第二届阿里云ECS CloudBuild开发者大赛即将启动
Together with digital people, digital space and XR platform, Alibaba cloud and its partners jointly build a "new vision"
365天挑战LeetCode1000题——Day 042 数组序号转换 + 相对名次 离散化处理