 PyTorch Release Notesdata for this model should contain binary information about whether a user interacted with a specific item. NCF was first described by Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu and Tat-Seng data for this model should contain binary information about whether a user interacted with a specific item. NCF was first described by Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu and Tat-Seng data for this model should contain binary information about whether a user interacted with a specific item. NCF was first described by Xiangnan He, Lizi Liao, PyTorch Release 23.05 PyTorch RN-08516-001_v230 码力 | 365 页 | 2.94 MB | 1 年前3 PyTorch Release Notesdata for this model should contain binary information about whether a user interacted with a specific item. NCF was first described by Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu and Tat-Seng data for this model should contain binary information about whether a user interacted with a specific item. NCF was first described by Xiangnan He, Lizi Liao, Hanwang Zhang, Liqiang Nie, Xia Hu and Tat-Seng data for this model should contain binary information about whether a user interacted with a specific item. NCF was first described by Xiangnan He, Lizi Liao, PyTorch Release 23.05 PyTorch RN-08516-001_v230 码力 | 365 页 | 2.94 MB | 1 年前3
 从推荐模型的基础特点看大规模推荐类深度学习系统的设计 袁镱线训练,在线推理服务和持续上线 O2. 针对推荐特点的深度优化,达到业界先 进⽔平 推荐系统的核⼼特点 � Feature 1(基本特点) 1.1 User与推荐系统交互,7*24⼩时 流式学习 1.2 Item和User新增,离开/遗忘, Embedding空间动态变化。 短期命中的⾼频key随时间缓慢变化 少量的⾼频key占据了主要访问需求 ⼀段时间样 本命中的 unique key ID/tag/交叉特征 热⻔⽂章的特征,活跃⽤户的特征 推荐系统 模型上线 在线推理 模型训练 ⽂章 新闻 视频 Item User Item特征 ⽤户反馈 Item推荐 Embedding参数 本⼩时访问过的key 上⼩时访问过的key 访 问 百 分 ⽐ 时间(⼩ 时) � Feature 2(数据的时空特点) 2.1 短时间内只有部分item和user被 命中,只有部分参数被⽤到 � Feature 3(机器学习的特点) 的特点) 训练框架—基于参数服务器架构的分布式训练框架 TB级模型 分⽚ 存储/更新 百TB数据 分⽚训练 Feature 1: 动态空间 Feature 2.1:短时间内只有部分item和user 被命中,只有部分参数被⽤到 参数按需 获取/更新 Storage 异步训练流⽔线和多级存储:提升性能,降低内存成本 � 问题: � Learner线程中参数拉取和参数更新对性能影响⼤0 码力 | 22 页 | 6.76 MB | 1 年前3 从推荐模型的基础特点看大规模推荐类深度学习系统的设计 袁镱线训练,在线推理服务和持续上线 O2. 针对推荐特点的深度优化,达到业界先 进⽔平 推荐系统的核⼼特点 � Feature 1(基本特点) 1.1 User与推荐系统交互,7*24⼩时 流式学习 1.2 Item和User新增,离开/遗忘, Embedding空间动态变化。 短期命中的⾼频key随时间缓慢变化 少量的⾼频key占据了主要访问需求 ⼀段时间样 本命中的 unique key ID/tag/交叉特征 热⻔⽂章的特征,活跃⽤户的特征 推荐系统 模型上线 在线推理 模型训练 ⽂章 新闻 视频 Item User Item特征 ⽤户反馈 Item推荐 Embedding参数 本⼩时访问过的key 上⼩时访问过的key 访 问 百 分 ⽐ 时间(⼩ 时) � Feature 2(数据的时空特点) 2.1 短时间内只有部分item和user被 命中,只有部分参数被⽤到 � Feature 3(机器学习的特点) 的特点) 训练框架—基于参数服务器架构的分布式训练框架 TB级模型 分⽚ 存储/更新 百TB数据 分⽚训练 Feature 1: 动态空间 Feature 2.1:短时间内只有部分item和user 被命中,只有部分参数被⽤到 参数按需 获取/更新 Storage 异步训练流⽔线和多级存储:提升性能,降低内存成本 � 问题: � Learner线程中参数拉取和参数更新对性能影响⼤0 码力 | 22 页 | 6.76 MB | 1 年前3
 全连接神经网络实战. pytorch 版归0w l o s s . backward () optimizer . step () i f batch % 100 == 0: loss , current = l o s s . item () , batch ∗ len (X) print ( f ” l o s s : ␣{ l o s s :>7 f }␣␣ [{ current :>5d}/{ s i z e :>5d }] pred = model (X) test_loss += loss_function ( pred , y) . item () correct += ( pred . argmax (1) == y) . type ( torch . f l o a t ) . sum() . item () test_loss /= num_batches cor rect /= s i z e print Backpropagation optimizer . zero_grad () l o s s . backward () optimizer . step () l o s s = l o s s . item () print ( f ” l o s s : ␣{ l o s s :>7 f }” ) def test_loop ( dataset , label , model , loss_function0 码力 | 29 页 | 1.40 MB | 1 年前3 全连接神经网络实战. pytorch 版归0w l o s s . backward () optimizer . step () i f batch % 100 == 0: loss , current = l o s s . item () , batch ∗ len (X) print ( f ” l o s s : ␣{ l o s s :>7 f }␣␣ [{ current :>5d}/{ s i z e :>5d }] pred = model (X) test_loss += loss_function ( pred , y) . item () correct += ( pred . argmax (1) == y) . type ( torch . f l o a t ) . sum() . item () test_loss /= num_batches cor rect /= s i z e print Backpropagation optimizer . zero_grad () l o s s . backward () optimizer . step () l o s s = l o s s . item () print ( f ” l o s s : ␣{ l o s s :>7 f }” ) def test_loop ( dataset , label , model , loss_function0 码力 | 29 页 | 1.40 MB | 1 年前3
 超大规模深度学习在美团的应用-余建平开源: PaddlePaddle、XDL,etc.  内部: Abacus、XPS, etc. • Online Learning的价值  用户的近期行为,更能表现意图和偏好  增强新item的模型感知能力 • 更快数据反馈、更少资源消耗  分钟级的数据反馈  增量训练、避免batch重训带来的资源消耗 关于Online Learning MLX的模型能力 • 支持千亿级特征、千亿级样本 • 样本&特征的设计 • 模型的通路 模型召回解决方案 • 基于双塔的模型召回架构  基于用户和item的DNN结构  产出用户和item两侧向量 • 基于ANN的向量相似度检索  Item侧离线计算,形成ANN词表  用户侧向量实时计算,通过ANN找出相 似item向量 召回模型设计 • LBS的负例采样  与位置相关的negative sampling 样本 样本 & 特征设计 • 特征设计  用户侧:能设计完整的特征,个性化,实时特征  Item侧:预计算带来的副作用,不能使用实时特征 点击(+) 仅曝光 同地域 全体集合 分布偏差大 无效信息多 样本分布 • 在线、近线、离线全流程解决方案 召回模型通路 • 粗排模型 • 精排模型 排序模型解决方案 • 粗排阶段的特点  候选集大,通常在千到万级别  线上的响应时间要求高,通常在几到十几ms0 码力 | 41 页 | 5.96 MB | 1 年前3 超大规模深度学习在美团的应用-余建平开源: PaddlePaddle、XDL,etc.  内部: Abacus、XPS, etc. • Online Learning的价值  用户的近期行为,更能表现意图和偏好  增强新item的模型感知能力 • 更快数据反馈、更少资源消耗  分钟级的数据反馈  增量训练、避免batch重训带来的资源消耗 关于Online Learning MLX的模型能力 • 支持千亿级特征、千亿级样本 • 样本&特征的设计 • 模型的通路 模型召回解决方案 • 基于双塔的模型召回架构  基于用户和item的DNN结构  产出用户和item两侧向量 • 基于ANN的向量相似度检索  Item侧离线计算,形成ANN词表  用户侧向量实时计算,通过ANN找出相 似item向量 召回模型设计 • LBS的负例采样  与位置相关的negative sampling 样本 样本 & 特征设计 • 特征设计  用户侧:能设计完整的特征,个性化,实时特征  Item侧:预计算带来的副作用,不能使用实时特征 点击(+) 仅曝光 同地域 全体集合 分布偏差大 无效信息多 样本分布 • 在线、近线、离线全流程解决方案 召回模型通路 • 粗排模型 • 精排模型 排序模型解决方案 • 粗排阶段的特点  候选集大,通常在千到万级别  线上的响应时间要求高,通常在几到十几ms0 码力 | 41 页 | 5.96 MB | 1 年前3
 《Efficient Deep Learning Book》[EDL] Chapter 4 - Efficient Architecturestext. def decode(items, vocab): text_items = [] for item in items: text_item = [vocab[token] for token in item] text_items.append(text_item) return text_items def get_attention_scores(text): # read_config=tfds.ReadConfig(try_autocache=False) ) IMG_SIZE = 128 def preprocess(item): image, mask = item['image'], item['segmentation_mask'] # Resize image and mask to IMG_SIZE image = tf.image.resize(image0 码力 | 53 页 | 3.92 MB | 1 年前3 《Efficient Deep Learning Book》[EDL] Chapter 4 - Efficient Architecturestext. def decode(items, vocab): text_items = [] for item in items: text_item = [vocab[token] for token in item] text_items.append(text_item) return text_items def get_attention_scores(text): # read_config=tfds.ReadConfig(try_autocache=False) ) IMG_SIZE = 128 def preprocess(item): image, mask = item['image'], item['segmentation_mask'] # Resize image and mask to IMG_SIZE image = tf.image.resize(image0 码力 | 53 页 | 3.92 MB | 1 年前3
 微博在线机器学习和深度学习实践-黄波特征深度化:特征embedding • 模型深度化:深度学习模型, Wide&Deep;DeepFM 4 深度学习 物料粗排 特征向量化 基于Item2vec的 博主召回和微博 召回 物料精排 向量索引 DSSM/FM/FF M生成博主与物 料向量,采用 向量进行召回 特征向量化:Item2vec 向量索引:FM/FFM/ DSSM 模型召回:DIN/DIEN/TDM 模型召回 融入用户近期互动行 为的深度模型召回 基于word2vec、bert等生成embedding向量,提高了语义编码的准确性,降低了训练成本 • 指标提升主要来源于Embedding特征保留了更多原始信息,避免了标签带来的信息损失 • User/Item Embedding 协同召回 • Item2vec相比于传统协同过滤MF等,稀疏样本下表现极好 • 同时该特征可用于排序部分特征输入 • 深度模型效果对比 • DeepFM相比于FM模型,相关指标提升4+% •0 码力 | 36 页 | 16.69 MB | 1 年前3 微博在线机器学习和深度学习实践-黄波特征深度化:特征embedding • 模型深度化:深度学习模型, Wide&Deep;DeepFM 4 深度学习 物料粗排 特征向量化 基于Item2vec的 博主召回和微博 召回 物料精排 向量索引 DSSM/FM/FF M生成博主与物 料向量,采用 向量进行召回 特征向量化:Item2vec 向量索引:FM/FFM/ DSSM 模型召回:DIN/DIEN/TDM 模型召回 融入用户近期互动行 为的深度模型召回 基于word2vec、bert等生成embedding向量,提高了语义编码的准确性,降低了训练成本 • 指标提升主要来源于Embedding特征保留了更多原始信息,避免了标签带来的信息损失 • User/Item Embedding 协同召回 • Item2vec相比于传统协同过滤MF等,稀疏样本下表现极好 • 同时该特征可用于排序部分特征输入 • 深度模型效果对比 • DeepFM相比于FM模型,相关指标提升4+% •0 码力 | 36 页 | 16.69 MB | 1 年前3
 《Efficient Deep Learning Book》[EDL] Chapter 3 - Learning Techniquesimport tensorflow as tf # Target image size IMG_SIZE = 264 def dsitem_to_tuple(item): return (item['image'], item['label']) def resize_image(image, label): image = tf.image.resize(image, [IMG_SIZE naw from nlpaug.augmenter import char as nac from nlpaug import flow as naf [nltk_download(item) for item in ['punkt', 'wordnet']] aug_args = dict(aug_p=0.3, aug_max=40) chain = [ nas.random.Rand0 码力 | 56 页 | 18.93 MB | 1 年前3 《Efficient Deep Learning Book》[EDL] Chapter 3 - Learning Techniquesimport tensorflow as tf # Target image size IMG_SIZE = 264 def dsitem_to_tuple(item): return (item['image'], item['label']) def resize_image(image, label): image = tf.image.resize(image, [IMG_SIZE naw from nlpaug.augmenter import char as nac from nlpaug import flow as naf [nltk_download(item) for item in ['punkt', 'wordnet']] aug_args = dict(aug_p=0.3, aug_max=40) chain = [ nas.random.Rand0 码力 | 56 页 | 18.93 MB | 1 年前3
 【PyTorch深度学习-龙龙老师】-测试版202112https://github.com/dragen1860/Deep-Learning-with-PyTorch-book ❑ 姊妹书《TensorFlow 深度学习—深入理解人工智能算法设计》: https://item.jd.com/12954866.html ❑ 联系邮箱(一般问题建议 Github issues 交流):liangqu.long AT gmail.com ❑ 配套视频课程(收费,提供答疑等全服务,比较适合初学者): sum() # 计算 MAE if step % 2 == 0: # 间隔性地打印训练误差 print(epoch, step, loss.item()) # 计算梯度,并更新 optimizer.zero_grad() loss.backward() optimizer backward() optimizer.step() # 打印 loss 值 print(epoch, 'loss:', loss.item()) 重复上述步骤若干次后即可逐步优化模型。 在验证或测试阶段,由于不需要记录梯度信息,推理代码一般需要写在 torch.no_grad 环境中。前向计算得到的输出经过 softmax0 码力 | 439 页 | 29.91 MB | 1 年前3 【PyTorch深度学习-龙龙老师】-测试版202112https://github.com/dragen1860/Deep-Learning-with-PyTorch-book ❑ 姊妹书《TensorFlow 深度学习—深入理解人工智能算法设计》: https://item.jd.com/12954866.html ❑ 联系邮箱(一般问题建议 Github issues 交流):liangqu.long AT gmail.com ❑ 配套视频课程(收费,提供答疑等全服务,比较适合初学者): sum() # 计算 MAE if step % 2 == 0: # 间隔性地打印训练误差 print(epoch, step, loss.item()) # 计算梯度,并更新 optimizer.zero_grad() loss.backward() optimizer backward() optimizer.step() # 打印 loss 值 print(epoch, 'loss:', loss.item()) 重复上述步骤若干次后即可逐步优化模型。 在验证或测试阶段,由于不需要记录梯度信息,推理代码一般需要写在 torch.no_grad 环境中。前向计算得到的输出经过 softmax0 码力 | 439 页 | 29.91 MB | 1 年前3
 阿里云上深度学习建模实践-程孟力EasyVision: 图像视频算法库 Bert TextInput Optim izer 性能优越:  分布式存储  分布式查询 功能完备:  GSL/负采样  主流图算法  异构图 (user/item/attribute)  动态图 标准化: Standard Libraries Graph-Learn: 分布式图算法库 标准化: Standard Solutions Continuous conversion] Sequence Feature [side info] Op Fusion [hash + embedding] Overlap Execution [FG OP化] Item Feature增量更新 3.工程优化复 杂 4.数据获取困 难 挑战 深度模型是非线性的: • 参数很多 • 参数敏感 • 不同场景的数据上差异大 从FM到DeepFM rt 增0 码力 | 40 页 | 8.51 MB | 1 年前3 阿里云上深度学习建模实践-程孟力EasyVision: 图像视频算法库 Bert TextInput Optim izer 性能优越:  分布式存储  分布式查询 功能完备:  GSL/负采样  主流图算法  异构图 (user/item/attribute)  动态图 标准化: Standard Libraries Graph-Learn: 分布式图算法库 标准化: Standard Solutions Continuous conversion] Sequence Feature [side info] Op Fusion [hash + embedding] Overlap Execution [FG OP化] Item Feature增量更新 3.工程优化复 杂 4.数据获取困 难 挑战 深度模型是非线性的: • 参数很多 • 参数敏感 • 不同场景的数据上差异大 从FM到DeepFM rt 增0 码力 | 40 页 | 8.51 MB | 1 年前3
 机器学习课程-温州大学-03深度学习-PyTorch入门numpy()  注意:  GPU tensor不能直接转为numpy数组,必须先转到CPU tensor。  如果tensor是标量的话,可以直接使用 item() 函数(只能是标量)将值取出来:loss_output.item() 1.Tensors张量的概念 8  Tensor与NumPy的异同 对比项 NumPy Tensor 相同点 可以定义多维数组,进行切片、改变维度、0 码力 | 40 页 | 1.64 MB | 1 年前3 机器学习课程-温州大学-03深度学习-PyTorch入门numpy()  注意:  GPU tensor不能直接转为numpy数组,必须先转到CPU tensor。  如果tensor是标量的话,可以直接使用 item() 函数(只能是标量)将值取出来:loss_output.item() 1.Tensors张量的概念 8  Tensor与NumPy的异同 对比项 NumPy Tensor 相同点 可以定义多维数组,进行切片、改变维度、0 码力 | 40 页 | 1.64 MB | 1 年前3
共 17 条
- 1
- 2













