OpenVINO 基于 Tensorflow 的模型训练及优化部署
昨天我们创建好了开发环境
Windows11 搭建 openvino_tensorflow 环境
今天和我一起试试基于 Tensorflow 的模型训练及优化部署。
1. 写代码前的准备
这个操作指南是基于最基础的机器学习的训练流程:
检查和理解数据
构建输入管道
建立模型
训练模型
测试模型
我们先启动之前搭建好环境的 Ubuntu

但是在 WSL 上写代码还是有点不习惯,因此我们采用 VSCode 的远程代码功能来进行项目的编写。

安装插件(Remote - WSL)
然后在右侧的菜单栏会看到一个远程的图标

启动它,然后点击图中标记的图标

等待服务器上安装必要的插件

通常它会单独的新开一个窗口。
点击“打开文件夹”会发现它显示的就是我们在 Ubuntu 上的目录

选择我们之前创建的代码目录(我的是:OV)

好了,这样我们就可以在 Windows 中使用 VSCode 来进行代码的编辑了。
2. 开始代码的编写
复制代码

导入必要的库
复制代码
有可能会发现少一些库,比如下图报红的部分,我们可以先安装一下

复制代码
由于我们后面会涉及到绘图等内容,因此需要在 VSCode 中再安装一个 ipykernel

快捷方式,选中一段代码然后右键选择“Run Current.....”

在右侧的 notebook 里面下载数据集
复制代码

查看一下数据集的保持位置

未完待续
版权声明: 本文为 InfoQ 作者【IT蜗壳-Tango】的原创文章。
原文链接:【http://xie.infoq.cn/article/84eb84d65691ddba6e415efc6】。
本文遵守【CC-BY 4.0】协议,转载请保留原文出处及本版权声明。
评论