1、PaddlePaddle使用CPU时正常运行,但是使用GPU时却报出一堆错误信息,节选如下:

paddle.fluid.core.EnforceNotMet: enforce allocating <= available failed,  >
at [/paddle/paddle/fluid/platform/gpu_info.cc:]
PaddlePaddle Call Stacks:
0x7f89b8241736p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) +
0x7f89b91f0afep paddle::platform::GpuMaxChunkSize() +
0x7f89b9120aadp paddle::memory::GetGPUBuddyAllocator(int) +
0x7f89b9120cbcp void* paddle::memory::Alloc<paddle::platform::CUDAPlace>(paddle::platform::CUDAPlace, unsigned long) +

解决方法:

export FLAGS_fraction_of_gpu_memory_to_use=

避免每次运行或者每个终端都添加一次,可将此按个人喜好添加到用户级~/.bashrc或系统级/etc/profile

2、PaddlePaddle使用Fluid版本,使用exe.run时候报错:

---------------------------------------------------------------------------
EnforceNotMet Traceback (most recent call last)
<ipython-input--ca8c92bb26a4> in <module>()
loss = exe.run(fluid.default_main_program(),
feed=feeder.feed(data),
---> fetch_list=[avg_cost])
print("Pass {0},Loss {1}".format(pass_id,loss)) /home/dzqiu/anaconda2/lib/python2./site-packages/paddle/fluid/executor.pyc in run(self, program, feed, fetch_list, feed_var_name, fetch_var_name, scope, return_numpy, use_program_cache) self._feed_data(program, feed, feed_var_name, scope)
--> self.executor.run(program.desc, scope, , True, True)
outs = self._fetch_data(fetch_list, fetch_var_name, scope)
if return_numpy: EnforceNotMet: enforce y_dims.size() > y_num_col_dims failed, <=
The input tensor Y's rank of MulOp should be larger than y_num_col_dims. at [/paddle/paddle/fluid/operators/mul_op.cc:52]
PaddlePaddle Call Stacks:
0x7f3db10d7736p paddle::platform::EnforceNotMet::EnforceNotMet(std::__exception_ptr::exception_ptr, char const*, int) +
0x7f3db16da696p paddle::operators::MulOp::InferShape(paddle::framework::InferShapeContext*) const +
0x7f3db1f0ef7bp paddle::framework::OperatorWithKernel::RunImpl(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) const +
0x7f3db1f0c6edp paddle::framework::OperatorBase::Run(paddle::framework::Scope const&, boost::variant<paddle::platform::CUDAPlace, paddle::platform::CPUPlace, paddle::platform::CUDAPinnedPlace, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_, boost::detail::variant::void_> const&) +
0x7f3db11734afp paddle::framework::Executor::RunPreparedContext(paddle::framework::ExecutorPrepareContext*, paddle::framework::Scope*, bool, bool, bool) +
0x7f3db1174500p paddle::framework::Executor::Run(paddle::framework::ProgramDesc const&, paddle::framework::Scope*, int, bool, bool) +

 解决方法:

 在训练前先执行:exe.run(fluid.default_startup_program())

【PaddlePaddle系列】报错解决方法合集 (不定时更新)的更多相关文章

  1. 菜鸟的Xamarin.Forms前行之路——从新建项目到APP上架各种报错问题解决方法合集(不定时更新)

    出自:博客园-半路独行 原文地址:http://www.cnblogs.com/banluduxing/p/7425791.html 本文出自于http://www.cnblogs.com/banlu ...

  2. eclipse创建的maven项目,pom.xml文件报错解决方法

    [错误一:]maven 编译级别过低 [解决办法:] 使用 maven-compiler-plugin 将 maven 编译级别改为 jdk1.6 以上: <!-- java编译插件 --> ...

  3. MyEclipse Server view报错解决方法

    MyEclipse Server view报错解决方法 方法/步骤     启动MyEclipse,弹出一个框,报错. ---------------------------------------- ...

  4. Loadrunner参数化逗号报错解决方法

    Loadrunner参数化逗号报错解决方法     介绍Loadrunner参数化时,参数中包含有逗号时出错的解决方法. 在Loadrunner进行参数化时,参数中如果含有逗号,编辑保存后会报错: 此 ...

  5. Android Studio support 26.0.0-alpha1 Failed to resolve: com.android.support:appcompat-v7:27.+ 报错解决方法

    AS下如何生成自定义的.jks签名文件, 以及如何生成数字签名 链接:http://www.cnblogs.com/smyhvae/p/4456420.html 链接:http://blog.csdn ...

  6. iOS url带中文下载时 报错解决方法

    问题描述:下载文件时, 请求带中文的URL的资源时,比如:http://s237.sznews.com/pic/2010/11/23/e4fa5794926548ac953a8a525a23b6f2/ ...

  7. jquery jssdk分享报错解决方法

    jssdk分享报错解决方法 一般都是参数传错了

  8. django.db.utils.InternalError: (1060, "Duplicate column name 'user_id'")迁移报错解决方法

    django.db.utils.InternalError: (1060, "Duplicate column name 'user_id'")迁移报错解决方法 django.db ...

  9. create-react-app创建项目后,运行npm run eject报错解决方法

    运行npm run eject报错解决方法 主要问题是脚手架添加.gitgnore文件,但是却没有本地仓库,使用以下命令操作以下就可以了 git init git add . git commit - ...

随机推荐

  1. 为什么const对象只能调用const成员函数,而不能调用非const成员函数?

    在c++中,我们可以用const来定义一个const对象,const对象是不可以调用类中的非const成员函数,这是为什么呢?下面是我总结的一些原理. 假设有一个类,名字为test代码如下: clas ...

  2. arduino IO口

    AVR单片机的每组I/O口都配备有三个8位寄存器,分别是:方向控制寄存器DDRx.数据寄存器PORTx.输入引脚寄存器PINx(x=A/B/C/D).I/O口的工作方式和表现特征由这三个I/O寄存器控 ...

  3. python编码(五)

    说说区位码.GB2312.内码和代码页 目前Windows的内核已经采用Unicode编码,这样在内核上可以支持全世界所有的语言文字.但是由于现有的大量程序和文档都采用了某种特定语言的编码,例如GBK ...

  4. 反爬虫破解系列-汽车之家利用css样式替换文字破解方法

    网站: 汽车之家:http://club.autohome.com.cn/ 以论坛为例 反爬虫措施: 在论坛发布的贴子正文中随机抽取某几个字使用span标签代替,标签内容位空,但css样式显示为所代替 ...

  5. (连通图 模板题 无向图求桥)Critical Links -- UVA -- 796

    链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem& ...

  6. git 删除追踪状态

    当不小心添加一个不想被git记录等文件时,这个时候就算将该文件记录在了.gitignore里也是没有用的,因为那个文件已经被git记录过了,只有那些从来没有被git记录过的文件(即:自添加进项目后,从 ...

  7. RxJava2 源码分析

    前言 很多项目使用流行的Rxjava2 + Retrofit搭建网络框架,Rxjava现在已经发展到Rxjava2,之前一直都只是再用Rxjava,但从来没有了解下Rxjava的内部实现,接下来一步步 ...

  8. U盘单个文件最大4G限制问题

    1.不同文件系统的最大分区以及单个文件最大限制 FAT32单个文件最大不能超过4G,超过4G就不能读取了. NTFS(Windows):支持最大分区2TB,最大文件2TB FAT16(Windows) ...

  9. bolg迁移

    博客已迁移至:http://www.s0nnet.com 欢迎大家继续关注!!! 2015-7-4

  10. nodejs async

    官网:https://github.com/caolan/async 流程控制:简化十种常见流程的处理集合处理:如何使用异步操作处理集合中的数据工具类:几个常用的工具类 流程控制 详细说明:http: ...