当前位置: 首页 > news >正文

苏州做网站公司选苏州聚尚网络互联网企业公司

苏州做网站公司选苏州聚尚网络,互联网企业公司,wordpress cms主题,唐山网站建设系统一、开发板资源介绍 该板具有4核心64位的处理器和8TOPS的AI算力,让我们验证一下,在该板上跑深度学习模型的效果如何? 二、配网及远程SSH登录访问系统 在通过microusb连接串口进入开发板调试,在命令行终端执行以下命令 1&#…

一、开发板资源介绍

该板具有4核心64位的处理器和8TOPS的AI算力,让我们验证一下,在该板上跑深度学习模型的效果如何?

二、配网及远程SSH登录访问系统

在通过microusb连接串口进入开发板调试,在命令行终端执行以下命令 

1)搜索wifi名称 

nmcli dev wifi

 2)连接wifi

sudo nmcli dev wifi connect wifi_name password wifi_passwd

 3)查看IP地址

ip a s wlan0

4)ssh访问

 通过xshell工具访问该开发板

三、安装开发环境

3.1 安装python环境

1)安装openssl 

sudo yum update -y
sudo yum -y groupinstall "Development tools"
sudo yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel psmisc libffi-devel gcc mariadb-devel

 2)下载安装包

cd /usr/local
sudo wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz
sudo tar -zxvf Python-3.7.0.tgz

 3)切换目录并执行安装

cd Python-3.7.0
sudo ./configure --prefix=/usr/local/python3
sudo make && make install

 4)环境配置

ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3

 3.2 创建虚拟环境

virtualenv ~/ecgclassification/venv --python=python3.9

其它相关配置

# 激活虚拟环境
source ~/ecgclassification/venv/bin/activate
#查看虚拟环境下的python路径
which python
# 安装相关包
pip install numpy  -i https://pypi.tuna.tsinghua.edu.cn/simple
# 退出虚拟环境
deactivate

 3.3 安装相关依赖

pip install h5py  -i https://pypi.tuna.tsinghua.edu.cn/simplepip install tensorflow==2.11.0  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install keras==2.11.0  -i https://pypi.tuna.tsinghua.edu.cn/simplepip install scikit-learn  -i https://pypi.tuna.tsinghua.edu.cn/simplepip install matplotlib -i https://pypi.tuna.tsinghua.edu.cn/simple

报错:

(venv) [root@openEuler ECGclassification]# pip install tensorFlow i https://pypi.tuna.tsinghua.edu.cn/simple Collecting https://pypi.tuna.tsinghua.edu.cn/simple Downloading https://pypi.tuna.tsinghua.edu.cn/simple (32.5 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 32.5/32.5 MB 1.1 MB/s eta 0:00:00 ERROR: Cannot unpack file /tmp/pip-unpack-s5nhhe64/simple.html (downloaded from /tmp/pip-req-build-89nbvw_j, content-type: text/html); cannot detect archive format ERROR: Cannot determine archive format of /tmp/pip-req-build-89nbvw_j

安装包名大小写敏感,更改正确! 

 解决方式:

sudo yum install hdf5-devel

 

再次安装tensoflow成功

 

 

四、心电疾病分类任务介绍及移植深度学习模型

    依据采集的单导联心电数据,构建的深度学习模型进行数据训练,基于训练生成的模型对心电数据进行疾病的分类任务(多分类-具体为7分类)。将该模型部署于该开发板上进行运行测试。

执行模型:

python3 ./PredictOnly.py

报错:

 model = tf.keras.models.load_model(model_path) File "/usr/local/lib/python3.9/site-packages/keras/src/saving/saving_api.py", line 193, in load_model raise ValueError( ValueError: File format not supported: filepath=save/CNN. Keras 3 only supports V3 `.keras` files and legacy H5 format files (`.h5` extension). Note that the legacy SavedModel format is not supported by `load_model()` in Keras 3. In order to reload a TensorFlow SavedModel as an inference-only layer in Keras 3, use `keras.layers.TFSMLayer(save/CNN, call_endpoint='serving_default')` (note that your `call_endpoint` might have a different name).

原因是安装TensorFlow版本不对,将2.16.0降到2.11.0后,以及keras从3.3.0降到2.9.0后正常。 

模型为:CNN架构

模型大小:pd格式,40Mb左右。 

五、测试结果

5.1  以pd格式的模型加载进行预测结果对比

 1)在R900p电脑上运行

执行时间1.04s

2)在该板子上的执行时间:

执行时间3.48s:

 5.2  以pd格式的模型转换为tflite格式并进行预测结果对比

 1)在R900p电脑上运行

执行时间0.08s

2)在该板子上的执行时间:

执行时间0.07s:

六、体验总结

对于深度学习模型的数据预测推理结果对比情况,在加载pd模型进行预测时:预测结果时间在3.48s。转换为tflite格式后部署,在笔记本电脑上运行的时间和在该开发板上运行的时间相当,在0.1s内,而且在该板子上运行的时间明显更快一些。因此通过对比结果来看,该开发板的计算性能不错,板子的运算能力能在实际场景下满足深度学习模型实时预测分类的需求。

http://www.yayakq.cn/news/232317/

相关文章:

  • 用v9做的网站上传服务器福州哪里会网站制作的
  • 肥西县住房和城乡建设局网站北京已经开始二次感染了
  • 公司网站维护好做吗phpcms网站系统 技术方案 系统框架图
  • 大学文明校园网站建设方案WordPress单页随机
  • 扁平化的网站有哪些网站的开发技术
  • 盘锦做网站选哪家好邮箱注册网址
  • 长沙制作手机网站商标注册查询是否有人注册了怎么查
  • 网站建设排期网站别人帮做的要注意什么东西
  • win2008网站404安徽省交通运输厅门户网站
  • 虚拟商城网站搭建网站是什么专业
  • 专业做ppt的网站网站后台更改首页代码
  • 广告联盟平台系统seo自学网免费
  • 网站开发人员是干什么的免费好玩的网页游戏
  • 如何别人看自己做的网站wordpress 缓存头像
  • 云虚拟主机 多个网站wordpress调用一篇文章
  • 免费网站免费网站建设 公司 常见问题
  • 凤岗网站设计广告网站留电话不用验证码
  • 佛山新网站制作卖老石器老榆木做哪个网站好
  • dw做aspx网站九江公司注册
  • 做违法网站会怎么样网站建设 发短信文案
  • nike网站建设方案成都到西安
  • 赣州网站建设方案四川住房和城乡建设部网站官网
  • 做数学题挣钱的网站wordpress list
  • 河北公司网站开发公司标志logo
  • 网站优化的链接建设网站优化主要工作有那些内容
  • 做saas平台网站中区网站建设
  • 织梦招商加盟网站源码西安企业自助建站
  • 全国网站备案咨询电话寺庙网站模板
  • 东莞 网站建设企业深圳网站制作必选祥奔科技
  • 旅游网站建设的费用明细中国制造网下载