事项要素模型

编程入门 行业动态 更新时间:2024-10-20 05:34:32

事项<a href=https://www.elefans.com/category/jswz/34/1767714.html style=要素模型"/>

事项要素模型

环境问题

普通Linux环境没什么问题

arm+麒麟系统

  • python3.7
  • tensorflow==1.14.0(tensorflow-1.14.0-cp37-none-linux_aarch64.whl)
  • keras==2.3.0
  • h5py==2.10.0(conda install h5py==2.10.0)
  • protobuf==3.20.0

docker操作:docker cp xxx 6a8:/root
docker exec -it 6a8 bash

报错

File "/home/qeh/anaconda3/envs/model-system/lib/python3.7/site-packages/keras/engine/saving.py", line 492, in load_wrapperreturn load_function(*args, **kwargs)File "/home/qeh/anaconda3/envs/model-system/lib/python3.7/site-packages/keras/engine/network.py", line 1230, in load_weightsf, self.layers, reshape=reshape)File "/home/qeh/anaconda3/envs/model-system/lib/python3.7/site-packages/keras/engine/saving.py", line 1183, in load_weights_from_hdf5_grouporiginal_keras_version = f.attrs['keras_version'].decode('utf8')
AttributeError: 'str' object has no attribute 'decode'
  • h5py版本问题
  • pip install h5py==2.10.0

安装h5py时遇到的问题

PackagesNotFoundError: The following packages are not available from current channels:

  • h5py==2.10.0
    Current channels:

  • To search for alternate channels that may provide the conda package you’re
    looking for, navigate to

    and use the search bar at the top of the page.
conda config --append channels conda-forge
conda search h5py==2.10.0
conda install h5py==2.10.0# 不行的话尝试这个
conda install -c conda-forge h5py==2.10.0

安装h5py会遇到各种不可控问题,最好打包conda环境来移植。

conda install conda-pack
# -o 参数指定打包路径和名称
conda pack -n 虚拟环境名 -o 打包环境名.tar.gz
# 创建目录 `my_env`,并将环境解压至该目录
mkdir -p my_env
tar -xzf my_env.tar.gz -C my_env

更多推荐

事项要素模型

本文发布于:2023-11-15 23:29:46,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609472.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:要素   模型   事项

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!