【问题标题】:spyder: python: theano: How to disable warnings in spyder?spyder:python:theano:如何禁用 spyder 中的警告?
【发布时间】:2014-07-14 22:20:27
【问题描述】:

我使用 theano 运行机器学习算法。我收到了很多关于 DeprecationWarning 的警告。来自 numpy 包。我想禁用此警告请建议选项。 警告性质:fromnumeric.py:932: DeprecationWarning: 将 ndim > 0 的数组转换为索引将导致将来出错

我尝试在运行配置后添加命令行选项 -W ignore 或 -W ignore::DeprecationWarning 但这些都不起作用

另外修复警告解决方案对我来说很好。看起来它已在 theano https://groups.google.com/forum/#!topic/theano-users/Hf7soRrnh8w 中修复,但我不知道在哪里可以找到这个更新版本的 theano

我正在使用 Anaconda 发行版 2.0.1 windows 8.1 - 64 位

谢谢

【问题讨论】:

  • 在 StackOverflow 中查看 answer。在那篇文章中,您可以遵循其他建议,以防其中一个不起作用。
  • 感谢 Carlos Cordoba,这些选项都不起作用,但是我发现了一些有用的东西,warnings.catch_warnings():warnings.simplefilter("ignore") main()
  • 我真的很高兴你能弄明白! :)

标签: python python-2.7 spyder theano


【解决方案1】:

查看此链接以将 Theano 更新到开发版本。我应该是固定的:

http://deeplearning.net/software/theano/install.html#bleeding-edge-install-instructions

在简历中,运行以下 2 个命令之一:

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git

或(如果您只想为当前用户安装它):

pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git --user

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-08-10
    • 2013-01-05
    • 2012-08-03
    • 2011-05-19
    • 2012-01-01
    • 1970-01-01
    相关资源
    最近更新 更多