 PyTorch Release NotesKnown Issues ‣ GNMTv2 inference performance regression of up to 50% due to an MKL slowdown. Other CPU-sensitive workloads could also be affected. ‣ The following CVEs might be flaggted but were patched benchmark = False`. ‣ GNMTv2 inference performance regression of up to 50% due to an MKL slowdown. Other CPU-sensitive workloads could also be affected. ‣ BERT pretraining performance regression of up to 17% operations in DALI 1.16.0 was changed to `True`, which could result in performance regressions on CPU-limited use cases. Set this argument to `False` to restore the previous behavior. PyTorch RN-08516-001_v230 码力 | 365 页 | 2.94 MB | 1 年前3 PyTorch Release NotesKnown Issues ‣ GNMTv2 inference performance regression of up to 50% due to an MKL slowdown. Other CPU-sensitive workloads could also be affected. ‣ The following CVEs might be flaggted but were patched benchmark = False`. ‣ GNMTv2 inference performance regression of up to 50% due to an MKL slowdown. Other CPU-sensitive workloads could also be affected. ‣ BERT pretraining performance regression of up to 17% operations in DALI 1.16.0 was changed to `True`, which could result in performance regressions on CPU-limited use cases. Set this argument to `False` to restore the previous behavior. PyTorch RN-08516-001_v230 码力 | 365 页 | 2.94 MB | 1 年前3
 Lecture Notes on Support Vector Machinedata samples and computing inner products in the high-dimensional feature space is of considerable overhead). Fortunately, the concept of kernels helps us avoid all these issues! With the help of kernels0 码力 | 18 页 | 509.37 KB | 1 年前3 Lecture Notes on Support Vector Machinedata samples and computing inner products in the high-dimensional feature space is of considerable overhead). Fortunately, the concept of kernels helps us avoid all these issues! With the help of kernels0 码力 | 18 页 | 509.37 KB | 1 年前3
 动手学深度学习 v2.0存储器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 12.4.4 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 12.4.5 的GPU。例如可以查看计算机是否装有NVIDIA GPU并已安装CUDA9。如果机器没有任何GPU,没有必要担心,因为CPU在前几章完全够用。但是,如果想 流畅地学习全部章节,请提早获取GPU并且安装深度学习框架的GPU版本。 我们可以按如下方式安装PyTorch的CPU或GPU版本: pip install torch==1.12.0 pip install torchvision==0 h和TensorFlow中为Tensor)都 与Numpy的ndarray类似。但深度学习框架又比Numpy的ndarray多一些重要功能:首先,GPU很好地支持加 速计算,而NumPy仅支持CPU计算;其次,张量类支持自动微分。这些功能使得张量类更适合深度学习。如 果没有特殊说明,本书中所说的张量均指的是张量类的实例。 2.1.1 入门 本节的目标是帮助读者了解并运行一些在阅读本书的过0 码力 | 797 页 | 29.45 MB | 1 年前3 动手学深度学习 v2.0存储器 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 518 12.4.4 CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 519 12.4.5 的GPU。例如可以查看计算机是否装有NVIDIA GPU并已安装CUDA9。如果机器没有任何GPU,没有必要担心,因为CPU在前几章完全够用。但是,如果想 流畅地学习全部章节,请提早获取GPU并且安装深度学习框架的GPU版本。 我们可以按如下方式安装PyTorch的CPU或GPU版本: pip install torch==1.12.0 pip install torchvision==0 h和TensorFlow中为Tensor)都 与Numpy的ndarray类似。但深度学习框架又比Numpy的ndarray多一些重要功能:首先,GPU很好地支持加 速计算,而NumPy仅支持CPU计算;其次,张量类支持自动微分。这些功能使得张量类更适合深度学习。如 果没有特殊说明,本书中所说的张量均指的是张量类的实例。 2.1.1 入门 本节的目标是帮助读者了解并运行一些在阅读本书的过0 码力 | 797 页 | 29.45 MB | 1 年前3
 PyTorch OpenVINO 开发实战系列教程第一篇是开放源代码的机器学习框架,目的是加速从研究 原型到产品开发的过程。其 SDK 主要基于 Python 语言,而 Python 语言作为流行的人工智能开发语言一直很受研究者与 开发者的欢迎。其模型训练支持CPU与GPU、支持分布式训练、 云部署、针对深度学习特定领域有不同的丰富的扩展库。 1.1.1 Pytorch 历史 Pytorch 在 2016 年由 facebook 发布的开源机器学习(深度 Pytorch 官网与 Github) 系统 Python3�6 Python3�7 Python3.8 Linux CPU/GPU 支持 支持 支持 Windows CPU/GPU 支持 支持 支持 Linux (aarch64) CPU 支持 支持 支持 Mac (CPU) 支持 支持 支持 当前最新稳定版本是 Pytorch 1.9.0、长期支持版本是 Pytorch 1.8.2( torchvision==0.10.0+cu102 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html CPU 支持版本的命令行如下(没有 GPU 显示支持): pip install torch torchvision torchaudio PyTorch + OpenVINO 开发实战系列教程 第一篇0 码力 | 13 页 | 5.99 MB | 1 年前3 PyTorch OpenVINO 开发实战系列教程第一篇是开放源代码的机器学习框架,目的是加速从研究 原型到产品开发的过程。其 SDK 主要基于 Python 语言,而 Python 语言作为流行的人工智能开发语言一直很受研究者与 开发者的欢迎。其模型训练支持CPU与GPU、支持分布式训练、 云部署、针对深度学习特定领域有不同的丰富的扩展库。 1.1.1 Pytorch 历史 Pytorch 在 2016 年由 facebook 发布的开源机器学习(深度 Pytorch 官网与 Github) 系统 Python3�6 Python3�7 Python3.8 Linux CPU/GPU 支持 支持 支持 Windows CPU/GPU 支持 支持 支持 Linux (aarch64) CPU 支持 支持 支持 Mac (CPU) 支持 支持 支持 当前最新稳定版本是 Pytorch 1.9.0、长期支持版本是 Pytorch 1.8.2( torchvision==0.10.0+cu102 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html CPU 支持版本的命令行如下(没有 GPU 显示支持): pip install torch torchvision torchaudio PyTorch + OpenVINO 开发实战系列教程 第一篇0 码力 | 13 页 | 5.99 MB | 1 年前3
 机器学习课程-温州大学-03深度学习-PyTorch入门7  Tensor在CPU和GPU之间转换,以及numpy之间的转换  CPU tensor转GPU tensor  cpu_tensor.cuda()  GPU tensor 转CPU tensor  gpu_tensor.cpu()  numpy转为CPU tensor  torch.from_numpy(numpy_test )  CPU tensor转为numpy数据 tensor转为numpy数据  cpu_tensor.numpy()  注意:  GPU tensor不能直接转为numpy数组,必须先转到CPU tensor。  如果tensor是标量的话,可以直接使用 item() 函数(只能是标量)将值取出来:loss_output.item() 1.Tensors张量的概念 8  Tensor与NumPy的异同 对比项 NumPy Tensor 相同点 可以定义多维数组,进行切片、改变维度、 数学运算等 可以定义多维数组,进行切片、改变维度、数学运 算等 不同点 1、产生的数组类型为 numpy.ndarray; 2、会将ndarray放入 CPU中进行运算; 3、导入方式为import numpy as np,后续 通过np.array([1,2])建立数组; 4、numpy中没有x.type()的用法,只能使用 type(x)。 1、产生的数组类型为torch0 码力 | 40 页 | 1.64 MB | 1 年前3 机器学习课程-温州大学-03深度学习-PyTorch入门7  Tensor在CPU和GPU之间转换,以及numpy之间的转换  CPU tensor转GPU tensor  cpu_tensor.cuda()  GPU tensor 转CPU tensor  gpu_tensor.cpu()  numpy转为CPU tensor  torch.from_numpy(numpy_test )  CPU tensor转为numpy数据 tensor转为numpy数据  cpu_tensor.numpy()  注意:  GPU tensor不能直接转为numpy数组,必须先转到CPU tensor。  如果tensor是标量的话,可以直接使用 item() 函数(只能是标量)将值取出来:loss_output.item() 1.Tensors张量的概念 8  Tensor与NumPy的异同 对比项 NumPy Tensor 相同点 可以定义多维数组,进行切片、改变维度、 数学运算等 可以定义多维数组,进行切片、改变维度、数学运 算等 不同点 1、产生的数组类型为 numpy.ndarray; 2、会将ndarray放入 CPU中进行运算; 3、导入方式为import numpy as np,后续 通过np.array([1,2])建立数组; 4、numpy中没有x.type()的用法,只能使用 type(x)。 1、产生的数组类型为torch0 码力 | 40 页 | 1.64 MB | 1 年前3
 TensorFlow on Yarn:深度学习遇上大数据多⼈多服务器使用混乱,计算资源如何划分?� • 没有GPUs集群资源管理和调度(内存、CPU、GPU、 端⼝),集群资源负载不均� • 训练数据⼿动分发,训练模型⼿动保存� • 进程遗留问题,需要⼿动杀死� • 缺乏作业统⼀管理,不便对作业运⾏状态跟踪� • 日志查看不⽅便� � 总结:� TensorFlow使用现状及痛点 • 集群资源的管理(目前支持CPU、内存,需要扩展GPU 资源管理)� • 作业的统⼀管理、状态跟踪� --worker-cores 1 \ #每个worker需要的CPU核数� --worker-gpus 2 \ #每个worker需要的GPU卡数� --ps-num 2 \ #ps数量� --ps-memory 1024M \ #每个ps需要的内存� --ps-cores 1 \ #每个ps需要的CPU核数� --priority VERY_LOW \ #作业优先级� Yarn技术细节揭秘 Yarn支持CPU调度 vs GPU调度:� CPU GPU 每个NodeManager配置可用CPU核心 数量 每个NodeManager配置可用GPU卡数 量 ResourceManager统计计数并按数量 分配 ResourceManager统计计数并按数量 分配 作业必须占用CPU资源 作业可以不需要GPU资源 系统自动分配物理CPU核心 需要知道具体GPU卡号,代码分配0 码力 | 32 页 | 4.06 MB | 1 年前3 TensorFlow on Yarn:深度学习遇上大数据多⼈多服务器使用混乱,计算资源如何划分?� • 没有GPUs集群资源管理和调度(内存、CPU、GPU、 端⼝),集群资源负载不均� • 训练数据⼿动分发,训练模型⼿动保存� • 进程遗留问题,需要⼿动杀死� • 缺乏作业统⼀管理,不便对作业运⾏状态跟踪� • 日志查看不⽅便� � 总结:� TensorFlow使用现状及痛点 • 集群资源的管理(目前支持CPU、内存,需要扩展GPU 资源管理)� • 作业的统⼀管理、状态跟踪� --worker-cores 1 \ #每个worker需要的CPU核数� --worker-gpus 2 \ #每个worker需要的GPU卡数� --ps-num 2 \ #ps数量� --ps-memory 1024M \ #每个ps需要的内存� --ps-cores 1 \ #每个ps需要的CPU核数� --priority VERY_LOW \ #作业优先级� Yarn技术细节揭秘 Yarn支持CPU调度 vs GPU调度:� CPU GPU 每个NodeManager配置可用CPU核心 数量 每个NodeManager配置可用GPU卡数 量 ResourceManager统计计数并按数量 分配 ResourceManager统计计数并按数量 分配 作业必须占用CPU资源 作业可以不需要GPU资源 系统自动分配物理CPU核心 需要知道具体GPU卡号,代码分配0 码力 | 32 页 | 4.06 MB | 1 年前3
 Machine Learning Pytorch TutorialTensors – Device ● Tensors & modules will be computed with CPU by default Use .to() to move tensors to appropriate devices. ● CPU x = x.to(‘cpu’) ● GPU x = x.to(‘cuda’) Tensors – Device (GPU) ● Check parameters(), 0.1) read data via MyDataset put dataset into Dataloader construct model and move to device (cpu/cuda) set loss function set optimizer Neural Network Training Loop for epoch in range(n_epochs): set model to train mode iterate through the dataloader set gradient to zero move data to device (cpu/cuda) forward pass (compute output) compute loss compute gradient (backpropagation) update model0 码力 | 48 页 | 584.86 KB | 1 年前3 Machine Learning Pytorch TutorialTensors – Device ● Tensors & modules will be computed with CPU by default Use .to() to move tensors to appropriate devices. ● CPU x = x.to(‘cpu’) ● GPU x = x.to(‘cuda’) Tensors – Device (GPU) ● Check parameters(), 0.1) read data via MyDataset put dataset into Dataloader construct model and move to device (cpu/cuda) set loss function set optimizer Neural Network Training Loop for epoch in range(n_epochs): set model to train mode iterate through the dataloader set gradient to zero move data to device (cpu/cuda) forward pass (compute output) compute loss compute gradient (backpropagation) update model0 码力 | 48 页 | 584.86 KB | 1 年前3
 【PyTorch深度学习-龙龙老师】-测试版202112年代就已经被提出,但直到 2012 年,基于两块 GTX580 GPU 训练的 AlexNet 发布后,深度学习的真正潜力才得以发挥。传统的机器学习算法并不像神经网络 这样对数据量和计算能力有严苛的要求,通常在 CPU 上串行训练即可得到满意结果。但是 深度学习非常依赖并行加速计算设备,目前的大部分神经网络均使用 NVIDIA GPU 和 Google TPU 等并行加速芯片训练模型参数。如围棋程序 AlphaGo 目前普通消费者能够使用的深度学习加速硬件设备主要来自 NVIDIA 的 GPU 显卡, 图 1.12 例举了从 2008 年到 2017 年 NVIDIA GPU 和 x86 CPU 的每秒 10 亿次的浮点运算数 (GFLOPS)的指标变换曲线。可以看到,x86 CPU 的曲线变化相对缓慢,而 NVIDIA GPU 的浮点计算能力指数式增长,这主要是由日益增长的游戏计算量和深度学习计算量等业务 驱动的。 预览版202112 over-130-partners/ 预览版202112 1.5 深度学习框架 13 是一个基于 Python 语言、定位底层运算的计算库,Theano 同时支持 GPU 和 CPU 运 算。由于 Theano 开发效率较低,模型编译时间较长,同时开发人员转投 TensorFlow 等原因,Theano 目前已经停止维护。 ❑ Scikit-learn 是一个完整的面向机0 码力 | 439 页 | 29.91 MB | 1 年前3 【PyTorch深度学习-龙龙老师】-测试版202112年代就已经被提出,但直到 2012 年,基于两块 GTX580 GPU 训练的 AlexNet 发布后,深度学习的真正潜力才得以发挥。传统的机器学习算法并不像神经网络 这样对数据量和计算能力有严苛的要求,通常在 CPU 上串行训练即可得到满意结果。但是 深度学习非常依赖并行加速计算设备,目前的大部分神经网络均使用 NVIDIA GPU 和 Google TPU 等并行加速芯片训练模型参数。如围棋程序 AlphaGo 目前普通消费者能够使用的深度学习加速硬件设备主要来自 NVIDIA 的 GPU 显卡, 图 1.12 例举了从 2008 年到 2017 年 NVIDIA GPU 和 x86 CPU 的每秒 10 亿次的浮点运算数 (GFLOPS)的指标变换曲线。可以看到,x86 CPU 的曲线变化相对缓慢,而 NVIDIA GPU 的浮点计算能力指数式增长,这主要是由日益增长的游戏计算量和深度学习计算量等业务 驱动的。 预览版202112 over-130-partners/ 预览版202112 1.5 深度学习框架 13 是一个基于 Python 语言、定位底层运算的计算库,Theano 同时支持 GPU 和 CPU 运 算。由于 Theano 开发效率较低,模型编译时间较长,同时开发人员转投 TensorFlow 等原因,Theano 目前已经停止维护。 ❑ Scikit-learn 是一个完整的面向机0 码力 | 439 页 | 29.91 MB | 1 年前3
 PyTorch Tutorialfrom_numpy(x_train) • Returns a cpu tensor! • PyTorch tensor to numpy • t.numpy() • Using GPU acceleration • t.to() • Sends to whatever device (cuda or cpu) • Fallback to cpu if gpu is unavailable: • torch torch.cuda.is_available() • Check cpu/gpu tensor OR numpy array ? • type(t) or t.type() • returns • numpy.ndarray • torch.Tensor • CPU - torch.cpu.FloatTensor • GPU - torch.cuda.FloatTensor *Assume0 码力 | 38 页 | 4.09 MB | 1 年前3 PyTorch Tutorialfrom_numpy(x_train) • Returns a cpu tensor! • PyTorch tensor to numpy • t.numpy() • Using GPU acceleration • t.to() • Sends to whatever device (cuda or cpu) • Fallback to cpu if gpu is unavailable: • torch torch.cuda.is_available() • Check cpu/gpu tensor OR numpy array ? • type(t) or t.type() • returns • numpy.ndarray • torch.Tensor • CPU - torch.cpu.FloatTensor • GPU - torch.cuda.FloatTensor *Assume0 码力 | 38 页 | 4.09 MB | 1 年前3
 Keras: 基于 Python 的深度学习库如果你在以下情况下需要深度学习库,请使用 Keras: • 允许简单而快速的原型设计(由于用户友好,高度模块化,可扩展性)。 • 同时支持卷积神经网络和循环神经网络,以及两者的组合。 • 在 CPU 和 GPU 上无缝运行。 查看文档,请访问 Keras.io。 Keras 兼容的 Python 版本: Python 2.7-3.6。 1.2 指导原则 • 用户友好。Keras 是为人类而不是为机器设计的 • 谷歌的 TensorFlow 后端 • 微软的 CNTK 后端 • Theano 后端 亚马逊也正在为 Keras 开发 MXNet 后端。 如此一来,你的 Keras 模型可以在 CPU 之外的不同硬件平台上训练: • NVIDIA GPU。 • Google TPU,通过 TensorFlow 后端和 Google Cloud。 • OpenGL 支持的 GPU, 比如 AMD 上 处理下一个序列 with tf.device_scope('/gpu:1'): encoded_b = shared_lstm(tweet_b) # 在 CPU 上连接结果 with tf.device_scope('/cpu:0'): merged_vector = keras.layers.concatenate([encoded_a, encoded_b], axis=-1)0 码力 | 257 页 | 1.19 MB | 1 年前3 Keras: 基于 Python 的深度学习库如果你在以下情况下需要深度学习库,请使用 Keras: • 允许简单而快速的原型设计(由于用户友好,高度模块化,可扩展性)。 • 同时支持卷积神经网络和循环神经网络,以及两者的组合。 • 在 CPU 和 GPU 上无缝运行。 查看文档,请访问 Keras.io。 Keras 兼容的 Python 版本: Python 2.7-3.6。 1.2 指导原则 • 用户友好。Keras 是为人类而不是为机器设计的 • 谷歌的 TensorFlow 后端 • 微软的 CNTK 后端 • Theano 后端 亚马逊也正在为 Keras 开发 MXNet 后端。 如此一来,你的 Keras 模型可以在 CPU 之外的不同硬件平台上训练: • NVIDIA GPU。 • Google TPU,通过 TensorFlow 后端和 Google Cloud。 • OpenGL 支持的 GPU, 比如 AMD 上 处理下一个序列 with tf.device_scope('/gpu:1'): encoded_b = shared_lstm(tweet_b) # 在 CPU 上连接结果 with tf.device_scope('/cpu:0'): merged_vector = keras.layers.concatenate([encoded_a, encoded_b], axis=-1)0 码力 | 257 页 | 1.19 MB | 1 年前3
共 30 条
- 1
- 2
- 3













