Intel DAAL AI加速——支持从数据预处理到模型预测,数据源必须使用DAAL的底层封装库
数据源加速见官方文档(必须使用DAAL自己的库):
- Numeric Tables
- Tensors
- Data Sources
- Data Dictionaries
- Data Serialization andDeserialization
- Data Compression
- Data Model
可以看到支持的数据源:同数据类型的table(matrix),不同类型的table,以及从DB文件取数据、数据序列化、压缩等。
在这些定制的数据源上,Intel DAAL使用自己底层的CPU进行硬件加速!下面摘自其官方:
Intel DAAL addresses all stages of the data analytics pipeline: preprocessing, transformation, analysis, modeling, validation, and decision-making.
Intel DAAL is developed by the same team as the Intel® Math Kernel Library (Intel® MKL)—the leading math library in the world. This team works closely with Intel® processor architects to squeeze performance from Intel processor-based systems.
Specs at a Glance
Processors | Intel Atom®, Intel Core™, Intel® Xeon®, and Intel® Xeon Phi™ processors and compatible processors |
Languages | Python*, C++, Java* |
Development Tools and Environments |
Microsoft Visual Studio* (Windows*) Eclipse* and CDT* (Linux*) |
Operating Systems | Use the same API for application development on multiple operating systems: Windows, Linux, and macOS* |
# file: low_order_moms_dense_batch.py
#===============================================================================
# Copyright 2014-2018 Intel Corporation.
#
# This software and the related documents are Intel copyrighted materials, and
# your use of them is governed by the express license under which they were
# provided to you (License). Unless the License provides otherwise, you may not
# use, modify, copy, publish, distribute, disclose or transmit this software or
# the related documents without Intel's prior written permission.
#
# This software and the related documents are provided as is, with no express
# or implied warranties, other than those that are expressly stated in the
# License.
#=============================================================================== ## <a name="DAAL-EXAMPLE-PY-LOW_ORDER_MOMENTS_DENSE_BATCH"></a>
## \example low_order_moms_dense_batch.py import os
import sys from daal.algorithms import low_order_moments
from daal.data_management import FileDataSource, DataSourceIface utils_folder = os.path.realpath(os.path.abspath(os.path.dirname(os.path.dirname(__file__))))
if utils_folder not in sys.path:
sys.path.insert(0, utils_folder)
from utils import printNumericTable DAAL_PREFIX = os.path.join('..', 'data') # Input data set parameters
dataFileName = os.path.join(DAAL_PREFIX, 'batch', 'covcormoments_dense.csv') def printResults(res):
printNumericTable(res.get(low_order_moments.minimum), "Minimum:")
printNumericTable(res.get(low_order_moments.maximum), "Maximum:")
printNumericTable(res.get(low_order_moments.sum), "Sum:")
printNumericTable(res.get(low_order_moments.sumSquares), "Sum of squares:")
printNumericTable(res.get(low_order_moments.sumSquaresCentered), "Sum of squared difference from the means:")
printNumericTable(res.get(low_order_moments.mean), "Mean:")
printNumericTable(res.get(low_order_moments.secondOrderRawMoment), "Second order raw moment:")
printNumericTable(res.get(low_order_moments.variance), "Variance:")
printNumericTable(res.get(low_order_moments.standardDeviation), "Standard deviation:")
printNumericTable(res.get(low_order_moments.variation), "Variation:") if __name__ == "__main__": # Initialize FileDataSource to retrieve input data from .csv file
dataSource = FileDataSource(
dataFileName,
DataSourceIface.doAllocateNumericTable,
DataSourceIface.doDictionaryFromContext
) # Retrieve the data from input file
dataSource.loadDataBlock() # Create algorithm for computing low order moments in batch processing mode
algorithm = low_order_moments.Batch() # Set input arguments of the algorithm
algorithm.input.set(low_order_moments.data, dataSource.getNumericTable()) # Get computed low order moments
res = algorithm.compute() printResults(res)
Intel DAAL AI加速——支持从数据预处理到模型预测,数据源必须使用DAAL的底层封装库的更多相关文章
- Intel DAAL AI加速——神经网络
# file: neural_net_dense_batch.py #================================================================= ...
- Intel DAAL AI加速 ——传统决策树和随机森林
# file: dt_cls_dense_batch.py #===================================================================== ...
- TensorFlow从1到2(六)结构化数据预处理和心脏病预测
结构化数据的预处理 前面所展示的一些示例已经很让人兴奋.但从总体看,数据类型还是比较单一的,比如图片,比如文本. 这个单一并非指数据的类型单一,而是指数据组成的每一部分,在模型中对于结果预测的影响基本 ...
- Keras 构建DNN 对用户名检测判断是否为非法用户名(从数据预处理到模型在线预测)
一. 数据集的准备与预处理 1 . 收集dataset (大量用户名--包含正常用户名与非法用户名) 包含两个txt文件 legal_name.txt ilegal_name.txt. 如下图所 ...
- 释放至强平台 AI 加速潜能 汇医慧影打造全周期 AI 医学影像解决方案
基于英特尔架构实现软硬协同加速,显著提升新冠肺炎.乳腺癌等疾病的检测和筛查效率,并帮助医疗科研平台预防"维度灾难"问题 <PAGE 1 LEFT COLUMN: CUSTOM ...
- 华为高级研究员谢凌曦:下一代AI将走向何方?盘古大模型探路之旅
摘要:为了更深入理解千亿参数的盘古大模型,华为云社区采访到了华为云EI盘古团队高级研究员谢凌曦.谢博士以非常通俗的方式为我们娓娓道来了盘古大模型研发的"前世今生",以及它背后的艰难 ...
- 【新人赛】阿里云恶意程序检测 -- 实践记录10.13 - Google Colab连接 / 数据简单查看 / 模型训练
1. 比赛介绍 比赛地址:阿里云恶意程序检测新人赛 这个比赛和已结束的第三届阿里云安全算法挑战赛赛题类似,是一个开放的长期赛. 2. 前期准备 因为训练数据量比较大,本地CPU跑不起来,所以决定用Go ...
- 英特尔® 至强® 平台集成 AI 加速构建数据中心智慧网络
英特尔 至强 平台集成 AI 加速构建数据中心智慧网络 SNA 通过 AI 方法来实时感知网络状态,基于网络数据分析来实现自动化部署和风险预测,从而让企业网络能更智能.更高效地为最终用户业务提供支撑. ...
- 第一章:AI人工智能 の 数据预处理编程实战 Numpy, Pandas, Matplotlib, Scikit-Learn
本课主题 数据中 Independent 变量和 Dependent 变量 Python 数据预处理的三大神器:Numpy.Pandas.Matplotlib Scikit-Learn 的机器学习实战 ...
随机推荐
- JavaScript Match
JavaScript Match 版权声明:未经授权,严禁转载! 随机数 // 随机数 Math.random() 随机生成一个大于等于0且小于1的小数. // 0>= r < 1 [0, ...
- 02: Redis缓存系统
目录: 1.1 在centos6.5中安装Redis 1.2 Redis的简介及两种基本操作 1.3 Redis对string操作(第一类) 1.4 redis对Hash操作,字典格式(第二类) 1. ...
- kubernetes extension point
以下大部分来自于k8s document, 笔者只是总结归纳, 解释不足的地方请参阅相关文档 Intention Non-sustainable way to customize Kubernetes ...
- python字符串、列表和文件对象总结
1.字符串是字符序列.字符串文字可以用单引号或者双引号分隔. 2.可以用内置的序列操作来处理字符串和列表:连接(+).重复(*).索引([]),切片([:])和长度(len()).可以用for循环遍历 ...
- Delphi XE5 for Android (一)
Delphi XE5 出来了,支持Android的开发,试用了一下,有几个问题: 1.只支持ARM7的设备,不支持Inter设备.手上刚好有一个华硕K004,很遗憾用不上,只能用手机试了. 2.要支持 ...
- ubuntu下转换flv格式为mp4格式
一.环境 ubuntu 16.04 二.安装工具 sudo apt install libav-tools 三.开始转换 avconv -i input.flv -codec copy output. ...
- HDU1251 统计难题 (字典树模板)题解
思路:模板题,贴个模板 代码: #include<cstdio> #include<cstring> #include<cstdlib> #include<q ...
- [BZOJ1103][POI2007]大都市meg dfs序+树状数组
Description 在经济全球化浪潮的影响下,习惯于漫步在清晨的乡间小路的邮递员Blue Mary也开始骑着摩托车传递邮件了.不过,她经常回忆起以前在乡间漫步的情景.昔日,乡下有依次编号为1..n ...
- 使用Android-studio开发移动app与weex结合开发详细步骤
详细步骤如下: 首先,确保机器已经安装了node.js,并且把npm更新到最新版本 下载完毕后,我们可以看到全局目录下的node_modules下面多出一个weex-toolkit 同时,我们留意 ...
- Java Collections Framework概览
本文github地址 概览 容器,就是可以容纳其他Java对象的对象.Java Collections Framework(JCF)为Java开发者提供了通用的容器,其始于JDK 1.2,优点是: 降 ...