我可以在我的W10笔记本电脑上本地运行Keras神经网络。
但是,在Docker中运行的相同代码非常慢,总是会出现错误:
ValueError: Feature my_feature is not in features dictionary.未找到的功能始终是目标功能。
笔记本电脑和容器之间有版本上的差异,但我不相信这有意义
笔记本电脑
Windows 10 Enterprise 64bit
Intel Core i7-7820HQ @ 2.90GHz
16GB RAM
Python 3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 17:00:18) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
λ pip list | grep tensorflow
tensorflow 2.0.0
tensorflow-estimator 2.0.1
λ pip list | grep pandas
pandas 0.23.3
pandas-ml 0.6.1
λ pip list | grep numpy
numpy 1.17.4Docker
# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
VERSION_CODENAME=stretch
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Python 3.6.10 (default, Apr 23 2020, 15:40:23)
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
root@modelbuilder:~# pip list | grep tensorflow
tensorflow 2.3.0
tensorflow-estimator 2.3.0
root@modelbuilder:~# pip list | grep pandas
pandas 0.24.0
pandas-ml 0.6.1
root@modelbuilder:~# pip list | grep numpy
numpy 1.19.2验证了这里提到的内容:ValueError: Feature not in features dictionary
目标没有被输入功能列,特性对应等等,这也会在本地失败。
任何帮助都将不胜感激。
发布于 2020-09-17 15:29:14
弄明白了。
崩溃问题:错误地为目标创建了功能列,因此从列的功能中删除了目标
慢码头工:一遍又一遍地运行model.fit() (多次)
https://stackoverflow.com/questions/63939874
复制相似问题