提起AI与编程,很多人的脑海里,浮现出的画面,也许是这样子的。

目前,即便是代码量要求较小的自动化 AI 模型训练框架,比如 AutoML/AutoKeras等,使用它们,也需要一定的的编程基础,需要编写许多行的代码。
那么,如果不敲代码,能训练一个 AI 模型吗?
是否可以这样,只需要在图像界面 GUI 上拖拖拽拽,能否自己训练一个属于自己的机器学习模型呢,让它能够识别图片的类别呢?
在这个优秀产品/平台层出不穷的时代,答案是肯定的。最近,笔者就发现了一个深度学习在线训练平台DeepCognition,地址:https://deepcognition.ai/

下面是使用方法:
总流程
1、新建项目-> 2、准备数据集-> 3、构建模型-> 4、设置超参数-> 5、训练模型 ->6、评估模型->7、应用部署
1、新建项目
注册登录后,进入控制面板里,选择左侧菜单里的「Projects」,点击加号按钮,新建「Project」,填写「Project」的名称「Name」。

接着,点击「Open」,开始设置项目参数。

2、准备数据集
DeepCognition 提供了已经整理好的公开数据集,让新手省去繁杂的数据预处理流程,先整体体验一遍深度学习的训练流程。
我们在「Data」标签下,先选择「Dataset」,DeepCognition 提供了已经整理好的数据集上面列出了一些经典的机器学习数据集。
在「Train/Validation/Test spilt」菜单下,有预置的数据集/验证集/测试集的分割比例选项,我们选择「80%/10%/10%」。此时,训练集48000张图片,验证集6000张图片,测试集6000张图片。
在「Load Dataset in Memory」选项中,使用默认的 One Batch at a time选择中,并把 Shuffle Data(打散数据) 勾上。

本次,我选择「cifar-10-public」,CIFAR-10数据集由10类32x32的彩色图片组成,一共包含60000张图片,每一类包含6000图片。

在下面的面板,我们可以看到「图片-对应标签」,并设置数据类型,输入/输出等。

3、自动构建模型
设置好数据集的类型、标签和分割方式之后,点击「Model」标签栏,我们开始用拖拽可视化部件的方式,像搭积木一样,构建我们的深度神经网络。
除此以外,我们还可以用AutoML自动化设计神经网络的方式, 让 DeepCognition一键生成神经网络结构,点击魔术棒图标,启用自动生成模型功能。

在弹出的对话框,这次我们选择「Input Content Type」为「 image」,「Output Content Type」为「category」。

模型结构可视化

4、设置超参数
设置超参数,先用默认设置,训练Epoch10次,让机器学习10次。

5、训练模型
训练前,要点击右上角的红色按钮。

打开「instance」,我们选择GPU「K80-12GB」,新用户会有2小时免费训练时长。

训练过程,可视化呈现

训练结果
在 CIFAR官网,在不使用数据增强时,基准结果是:错误率是18%,准确率也就是82%。
Baseline results
You can find some baseline replicable results on this dataset on the project page for cuda-convnet. These results were obtained with a convolutional neural network. Briefly, they are 18% test error without data augmentation and 11% with. Additionally, Jasper Snoek has a new paper in which he used Bayesian hyperparameter optimization to find nice settings of the weight decay and other hyperparameters, which allowed him to obtain a test error rate of 15% (without data augmentation) using the architecture of the net that got 18%.
12次 Epoch 训练后,这个10分类的图片数据集准确率约为71%,大约每10张识别正确7张,对于自动化平台训练且没有刻意调参的情况下,对于模型的表现,若满分5星,我给3.5星。

最后可以,查看部分模型识别图片的效果,因为笔者用完了免费的2小时训练时长,并且似乎信用卡不支持付费,因此,只能贴参考资料里,做手写图片识别的示意图了。

小结
你也可以做 AI 训练师了。
随着技术发展(黑客们日夜敲代码),深度神经网络已经在「去中心化」了,已经有不少机器学习平台,比如 Google 的 AutoML 和Deep Cognition为客户提供图像界面的服务,完成过去都属于程序员才能做的事。
无需繁琐的编写代码,客户可以根据自己的业务情景问题,在图形操作界面上:上传自己的数据集、堆积模型结构,设置超参数等,训练自己的机器学习模型。
当然了,目前自动化训练 AI 的平台还很局限,比如在计算机视觉领域,只能训练简单的图片类别识别模型。(据目前笔者所知)
希望,在不久的将来,机器学习模型的训练,越来越容易,我们能看到更多的 AI 落地应用。
因为,不熟悉技术的人,也许更熟悉业务场景。
网友评论