未验证 提交 7de29491 编写于 作者: L Li Fuchen 提交者: GitHub

add aistudio link in README (#3568)

* add aistudio link in README
上级 e7d1f9cf
# Image Classification Models
This directory contains six image classification models, which are models automatically discovered by Baidu Big Data Lab (BDL) Hierarchical Neural Architecture Search project (HiNAS), achieving 96.1% accuracy on CIFAR-10 dataset. These models are divided into two categories. The first three have no skip link, named HiNAS 0-2, and the last three networks contain skip links, which are similar to the shortcut connections in Resnet, named HiNAS 3-5.
We also recommend users to take a look at the  [IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122279)
---
## Table of Contents
- [Installation](#installation)
......
# Image Classification Models
本目录下包含6个图像分类模型,都是百度大数据实验室 Hierarchical Neural Architecture Search (HiNAS) 项目通过机器自动发现的模型,在CIFAR-10数据集上达到96.1%的准确率。这6个模型分为两类,前3个没有skip link,分别命名为 HiNAS 0-2号,后三个网络带有skip link,功能类似于Resnet中的shortcut connection,分别命名 HiNAS 3-5号。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122279)
---
## Table of Contents
- [Installation](#installation)
......
......@@ -62,6 +62,8 @@
```
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122272)
## 快速开始
### 安装说明
......
......@@ -17,6 +17,7 @@ DeepLabv3+ 是DeepLab语义分割系列网络的最新作,其前作有 DeepLab
![](./imgs/model.png)
Python Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/124366)
## 数据准备
......
......@@ -7,6 +7,8 @@ This is a simple demonstration of re-implementation in [PaddlePaddle.Fluid](http
> **Video in Demo**: *Bruno Mars - That’s What I Like [Official Video]*.
We also recommend users to take a look at the [IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122271)
## Requirements
- Python == 2.7 or 3.6
......
......@@ -7,6 +7,8 @@
> **演示视频**: *Bruno Mars - That’s What I Like [官方视频]*.
同时推荐用户参考[IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122271)
## 环境依赖
本目录下的代码均在4卡Tesla K40/P40 GPU,CentOS系统,CUDA-9.0/8.0,cuDNN-7.0环境下测试运行无误
......
......@@ -21,6 +21,7 @@ ICNet的主要思想是将输入图像变换为不同的分辨率,然后用不
<strong>图 1</strong>
</p>
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/124368)
## 数据准备
......
......@@ -26,6 +26,8 @@
## 简介
图像分类是计算机视觉的重要领域,它的目标是将图像分类到预定义的标签。近期,许多研究者提出很多不同种类的神经网络,并且极大的提升了分类算法的性能。本页将介绍如何使用PaddlePaddle进行图像分类。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122278)
## 快速开始
### 安装说明
......@@ -202,7 +204,7 @@ python eval.py \
python ema_clean.py \
--ema_model_dir=your_ema_model_dir \
--cleaned_model_dir=your_cleaned_model_dir
python eval.py \
--model=model_name \
--pretrained_model=your_cleaned_model_dir
......
......@@ -27,6 +27,8 @@ English | [中文](README.md)
Image classification, which is an important field of computer vision, is to classify images into pre-defined labels. Recently, many researchers have developed different kinds of neural networks and highly improved the classification performance. This page introduces how to do image classification with PaddlePaddle Fluid.
We also recommend users to take a look at the  [IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122278)
## Quick Start
### Installation
......@@ -198,7 +200,7 @@ Note: if you train model with flag use_ema, and you want to evaluate your Expone
python ema_clean.py \
--ema_model_dir=your_ema_model_dir \
--cleaned_model_dir=your_cleaned_model_dir
python eval.py \
--model=model_name \
--pretrained_model=your_cleaned_model_dir
......
......@@ -14,6 +14,10 @@
Running sample code in this directory requires PaddelPaddle Fluid v.1.3.0 and later. If the PaddlePaddle on your device is lower than this version, please follow the instructions in [installation document](http://paddlepaddle.org/documentation/docs/en/1.3/beginners_guide/install/index_en.html) and make an update.
We also recommend users to take a look at: 
[MaskRCNN](https://aistudio.baidu.com/aistudio/projectDetail/122273)
[Faster RCNN](https://aistudio.baidu.com/aistudio/projectDetail/122275)
## Introduction
Region Convolutional Neural Network (RCNN) models are two stages detector. According to proposals and feature extraction, obtain class and more precise proposals.
......
......@@ -14,6 +14,10 @@
在当前目录下运行样例代码需要PadddlePaddle Fluid的v.1.3.0或以上的版本。如果你的运行环境中的PaddlePaddle低于此版本,请根据[安装文档](http://www.paddlepaddle.org/)中的说明来更新PaddlePaddle。
同时推荐用户参考:
[MaskRCNN](https://aistudio.baidu.com/aistudio/projectDetail/122273)
[Faster RCNN](https://aistudio.baidu.com/aistudio/projectDetail/122275)
## 简介
区域卷积神经网络(RCNN)系列模型为两阶段目标检测器。通过对图像生成候选区域,提取特征,判别特征类别并修正候选框位置。
RCNN系列目前包含两个代表模型:Faster RCNN,Mask RCNN
......
......@@ -18,6 +18,7 @@ The Single Shot MultiBox Detector (SSD)
SSD is readily pluggable into a wide variant standard convolutional network, such as VGG, ResNet, or MobileNet, which is also called base network or backbone. In this tutorial we used [MobileNet](https://arxiv.org/abs/1704.04861).
We also recommend users to take a look at the  [IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122276)
### Data Preparation
......
......@@ -18,6 +18,7 @@ SSD 目标检测模型
SSD 可以方便地插入到任何一种标准卷积网络中,比如 VGG、ResNet 或者 MobileNet,这些网络被称作检测器的基网络。在这个示例中我们使用 [MobileNet](https://arxiv.org/abs/1704.04861)
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122276)
### 数据准备
......
......@@ -20,6 +20,8 @@
同时,在推断速度方面,基于Paddle预测库的加速方法,推断速度比darknet高30%.
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122277)
## 快速开始
### 安装
......@@ -268,26 +270,26 @@ if cfg.pretrain:
fluid.io.load_vars(exe, cfg.pretrain, predicate=if_exist)
cat_idxs = [3, 19, 25, 41, 58, 73]
# the first 5 channels is x, y, w, h, objectness,
# the first 5 channels is x, y, w, h, objectness,
# the following 80 channel is for 80 categories
channel_idxs = np.array(range(5) + [idx + 5 for idx in cat_idxs])
# we have 3 yolo_output layers
for i in range(3):
for i in range(3):
# crop conv weights
weights_tensor = fluid.global_scope().find_var(
"yolo_output.{}.conv.weights".format(i)).get_tensor()
weights = np.array(weights_tensor)
# each yolo_output layer has 3 anchors, 85 channels of each anchor
weights = np.concatenate(weights[channel_idxs],
weights[85 + channel_idxs],
weights = np.concatenate(weights[channel_idxs],
weights[85 + channel_idxs],
weights[170 + channel_idxs])
weights_tensor.set(weights.astype('float32'), place)
# crop conv bias
bias_tensor = fluid.global_scope().find_var(
"yolo_output.{}.conv.bias".format(i)).get_tensor()
bias = np.array(bias_tensor)
bias = np.concatenate(bias[channel_idxs],
bias[85 + channel_idxs],
bias = np.concatenate(bias[channel_idxs],
bias[85 + channel_idxs],
bias[150 + channel_idxs])
bias_tensor.set(bias.astype('float32'), place)
......@@ -323,4 +325,3 @@ if cfg.pretrain:
- [heavengate](https://github.com/heavengate)
- [tink2123](https://github.com/tink2123)
......@@ -20,6 +20,8 @@ We use many image augment and label smooth tricks from [Bag of Freebies for Trai
With execution acceleration method in Paddle framework prediction library, inference speed of YOLOv3 in our impliment can be 30% faster than darknet framework.
We also recommend users to take a look at the  [IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122277)
## Quick Start
### Installation
......@@ -94,7 +96,7 @@ Please make sure that pre-trained model is downloaded and loaded correctly, othe
--data_dir=${path_to_data} \
--class_num=${category_num}
- Set `export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7` to specifiy 8 GPUs to train.
- Set `export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7` to specifiy 8 GPUs to train.
- It is recommended to set `--use_multiprocess_reader=False` when training on Windows.
- Set `--worker_num=` to specifiy multiprocess reader worker number, which is default 8, if the number of CPU cores in the training environment is small, it is recommended to set worker number to a small value.
- For more help on arguments:
......@@ -268,26 +270,26 @@ if cfg.pretrain:
fluid.io.load_vars(exe, cfg.pretrain, predicate=if_exist)
cat_idxs = [3, 19, 25, 41, 58, 73]
# the first 5 channels is x, y, w, h, objectness,
# the first 5 channels is x, y, w, h, objectness,
# the following 80 channel is for 80 categories
channel_idxs = np.array(range(5) + [idx + 5 for idx in cat_idxs])
# we have 3 yolo_output layers
for i in range(3):
for i in range(3):
# crop conv weights
weights_tensor = fluid.global_scope().find_var(
"yolo_output.{}.conv.weights".format(i)).get_tensor()
weights = np.array(weights_tensor)
# each yolo_output layer has 3 anchors, 85 channels of each anchor
weights = np.concatenate(weights[channel_idxs],
weights[85 + channel_idxs],
weights = np.concatenate(weights[channel_idxs],
weights[85 + channel_idxs],
weights[170 + channel_idxs])
weights_tensor.set(weights.astype('float32'), place)
# crop conv bias
bias_tensor = fluid.global_scope().find_var(
"yolo_output.{}.conv.bias".format(i)).get_tensor()
bias = np.array(bias_tensor)
bias = np.concatenate(bias[channel_idxs],
bias[85 + channel_idxs],
bias = np.concatenate(bias[channel_idxs],
bias[85 + channel_idxs],
bias[150 + channel_idxs])
bias_tensor.set(bias.astype('float32'), place)
......@@ -323,4 +325,3 @@ If you can fix a issue or add a new feature, please open a PR to us. If your PR
- [heavengate](https://github.com/heavengate)
- [tink2123](https://github.com/tink2123)
......@@ -16,6 +16,8 @@ Overview of Deep Attention Matching Network
<img src="images/Figure2.png"/> <br />
</p>
同时推荐用户参考[IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122287)
## 快速开始
### 安装说明
1. paddle安装
......
......@@ -14,10 +14,12 @@ DuReader是一个大规模、面向真实应用、由人类生成的中文阅读
更多关于DuReader数据集的详细信息可在[DuReader官网](https://ai.baidu.com//broad/subordinate?dataset=dureader)找到。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122349)
## DuReader基线系统
DuReader基线系统利用[PaddlePaddle](http://paddlepaddle.org)深度学习框架,针对[DuReader阅读理解数据集](https://ai.baidu.com//broad/subordinate?dataset=dureader)实现并升级了一个经典的阅读理解模型 —— [BiDAF](https://arxiv.org/abs/1611.01603). 该基线系统相较于DuReader论文中的基线,效果上有了大幅提升(在DuReader2.0验证集、测试集的表现见下表)
| Model | Dev ROUGE-L | Test ROUGE-L |
| :------------- | :---------: | :----------: |
| BiDAF (原始[论文](https://arxiv.org/abs/1711.05073)基线) | 39.29 | 45.90 |
......@@ -33,7 +35,7 @@ DuReader基线系统利用[PaddlePaddle](http://paddlepaddle.org)深度学习框
* 系统:CentOS 6.3, cuda 9.0, CuDNN 7.0
* python 2.7.13
* PaddlePaddle 1.3.1
### 安装PaddlePaddle
关于PaddlePaddle框架的安装教程,详见[PaddlePaddle官方网站](http://www.paddlepaddle.org/#quick-start)
......@@ -112,7 +114,7 @@ sh run.sh --train --pass_num 5 --trainset ../data/extracted/trainset/zhidao.trai
```
以上参数配置会对模型进行5轮训练,并在每轮结束后利用验证集自动进行评估。每轮过后,程序会自动将模型参数保存到`data/models`文件夹当中,并以该轮的ID命名。
如果开发者需要改变模型训练时的超参数, 例如初始学习率、隐层维度等,可以通过指定以下参数来实现:
如果开发者需要改变模型训练时的超参数, 例如初始学习率、隐层维度等,可以通过指定以下参数来实现:
```
sh run.sh --train --pass_num 5 --learning_rate 0.00001 --hidden_size 100 --trainset ../data/extracted/trainset/zhidao.train.json ../data/extracted/trainset/search.train.json --devset ../data/extracted/devset/zhidao.dev.json ../data/extracted/devset/search.dev.json
......
......@@ -19,6 +19,8 @@
&ensp;&ensp;&ensp;&ensp;2. 利用少量标注数据(特定对话系统或场景的人工打分),在匹配模型基础上进行微调,可以显著提高该对话系统或场景的评估效果。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122301)
## 快速开始
### 安装说明
......@@ -35,7 +37,7 @@
#### &ensp;&ensp;b、下载代码
&ensp;&ensp;&ensp;&ensp;克隆数据集代码库到本地
```
git clone https://github.com/PaddlePaddle/models.git
cd models/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation
......@@ -54,7 +56,7 @@ cd models/PaddleNLP/dialogue_model_toolkit/auto_dialogue_evaluation
&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;模型结构: finetuning阶段学习表示到计算logits部分和第一阶段模型结构相同,区别在于finetuning阶段计算square_error_cost loss;
&ensp;&ensp;&ensp;&ensp;用于第二阶段fine-tuning的对话系统包括下面四部分:
```
human: 人工模拟的对话系统;
keywords:seq2seq keywords对话系统;
......@@ -66,7 +68,7 @@ seq2seq_naive:naive seq2seq model对话系统;
### 数据准备
&ensp;&ensp;&ensp;&ensp;数据集说明:本模块内只提供训练方法,真实涉及的匹配数据及4个对话系统的数据只开源测试集数据,仅提供样例,用户如有自动化评估对话系统的需求,可自行准备业务数据集按照文档提供流程进行训练;
```
unlabel_data(第一阶段训练匹配数据集)
......@@ -78,12 +80,12 @@ label_data(第二阶段finetuning数据集)
```
&ensp;&ensp;&ensp;&ensp;数据集、相关模型下载:
```
cd ade && bash prepare_data_and_model.sh
```
&ensp;&ensp;&ensp;&ensp;数据路径:data/input/data/
&ensp;&ensp;&ensp;&ensp;数据路径:data/input/data/
&ensp;&ensp;&ensp;&ensp;模型路径:data/saved_models/trained_models/
......@@ -98,9 +100,9 @@ loss_type: loss类型, 可选CLS或者L2
training_file: 训练数据路径
val_file: 验证集路径
predict_file: 预测文件路径
print_steps: 每隔print_steps个步数打印一次日志
print_steps: 每隔print_steps个步数打印一次日志
save_steps: 每隔save_steps个步数来保存一次模型
num_scan_data:
num_scan_data:
word_emb_init: 用于初始化embedding的词表路径
init_model: 初始化模型路径
use_cuda: 是否使用cuda, 如果是gpu训练时,设置成true
......@@ -121,7 +123,7 @@ evaluation_file: 参与评估的inference 文件
vocab_path: 词表路径
max_seq_len: 输入最大序列长度
random_seed: 随机种子设置
do_save_inference_model: 是否保存inference model
do_save_inference_model: 是否保存inference model
encable_ce: 是否开启ce
```
......@@ -135,19 +137,19 @@ encable_ce: 是否开启ce
bash run.sh matching train
```
&ensp;&ensp;&ensp;&ensp;如果为CPU训练:
&ensp;&ensp;&ensp;&ensp;如果为CPU训练:
```
请将run.sh内参数设置为:
请将run.sh内参数设置为:
1、export CUDA_VISIBLE_DEVICES=
```
&ensp;&ensp;&ensp;&ensp;如果为GPU训练:
&ensp;&ensp;&ensp;&ensp;如果为GPU训练:
```
请将run.sh内参数设置为:
请将run.sh内参数设置为:
1、如果为单卡训练(用户指定空闲的单卡):
export CUDA_VISIBLE_DEVICES=0
export CUDA_VISIBLE_DEVICES=0
2、如果为多卡训练(用户指定空闲的多张卡):
export CUDA_VISIBLE_DEVICES=0,1,2,3
```
......@@ -199,7 +201,7 @@ python -u main.py \
--emb_size=256 \
--vocab_size=484016 \
--learning_rate=0.001 \
--sample_pro=0.1
--sample_pro=0.1
```
注意: 用户进行模型训练、预测、评估等, 可通过修改data/config/ade.yaml配置文件或者从命令行传入来进行参数配置, 优先推荐命令行参数传入;
......@@ -278,17 +280,17 @@ python -u main.py \
bash run.sh matching predict
```
&ensp;&ensp;&ensp;&ensp;如果为CPU预测:
&ensp;&ensp;&ensp;&ensp;如果为CPU预测:
```
请将run.sh内参数设置为:
请将run.sh内参数设置为:
export CUDA_VISIBLE_DEVICES=
```
&ensp;&ensp;&ensp;&ensp;如果为GPU预测:
&ensp;&ensp;&ensp;&ensp;如果为GPU预测:
```
请将run.sh内参数设置为:
请将run.sh内参数设置为:
单卡预测:
export CUDA_VISIBLE_DEVICES=0 #用户可自行指定空闲的卡
```
......@@ -376,7 +378,7 @@ python -u main.py \
### 模型评估
&ensp;&ensp;&ensp;&ensp;模块中5个任务,各任务支持计算的评估指标内容如下:
```
第一阶段:
matching: 使用R1@2, R1@10, R2@10, R5@10四个指标进行评估排序模型的效果;
......@@ -391,7 +393,7 @@ seq2seq_naive:使用spearman相关系数来衡量评估模型对系统的打
&ensp;&ensp;&ensp;&ensp;效果上,以四个不同的对话系统(seq2seq\_naive/seq2seq\_att/keywords/human)为例,使用对话自动评估工具进行自动评估。
&ensp;&ensp;&ensp;&ensp;1. 无标注数据情况下,直接使用预训练好的评估工具进行评估;
&ensp;&ensp;&ensp;&ensp;&ensp;&ensp;在四个对话系统上,自动评估打分和人工评估打分spearman相关系数,如下:
||seq2seq\_naive|seq2seq\_att|keywords|human|
......@@ -419,7 +421,7 @@ bash run.sh matching evaluate
注:评估计算ground_truth和predict_label之间的打分,默认CPU计算即可;
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行评估相关的代码:
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行评估相关的代码:
```
export CUDA_VISIBLE_DEVICES= #指默认CPU评估
......@@ -445,7 +447,7 @@ task_type: train、predict、evaluate、inference, 选择4个参数选项中任
评估示例: bash run.sh human evaluate
```
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行评估相关的代码:
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行评估相关的代码:
```
export CUDA_VISIBLE_DEVICES= #指默认CPU评估
......@@ -467,22 +469,22 @@ python -u main.py \
bash run.sh matching inference
```
&ensp;&ensp;&ensp;&ensp;如果为CPU执行inference model过程:
&ensp;&ensp;&ensp;&ensp;如果为CPU执行inference model过程:
```
请将run.sh内参数设置为:
请将run.sh内参数设置为:
export CUDA_VISIBLE_DEVICES=
```
&ensp;&ensp;&ensp;&ensp;如果为GPU执行inference model过程:
```
请将run.sh内参数设置为:
请将run.sh内参数设置为:
单卡推断(用户指定空闲的单卡):
export CUDA_VISIBLE_DEVICES=0
```
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行inference model相关的代码:
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行inference model相关的代码:
```
export CUDA_VISIBLE_DEVICES=0 # 指GPU单卡推断
......@@ -505,7 +507,7 @@ python -u main.py \
#### 2、第二阶段finetuning模型的推断:
#### &ensp;&ensp;&ensp;&ensp;方式一: 推荐直接使用模块内脚本保存inference model
```
bash run.sh task_name task_type
参数说明:
......@@ -517,7 +519,7 @@ task_type: train、predict、evaluate、inference, 选择4个参数选项中任
&ensp;&ensp;&ensp;&ensp;CPU和GPU指定方式同模型推断1中所示;
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行inference model相关的代码:
#### &ensp;&ensp;&ensp;&ensp;方式二: 执行inference model相关的代码:
```
export CUDA_VISIBLE_DEVICES=0 # 指GPU单卡推断
......
......@@ -25,6 +25,7 @@
| BERT | 93.6% | 92.3% | 78.6% |
| ERNIE | 94.4% | 94.0% | 80.6% |
同时推荐用户参考[IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122291)
## 快速开始
......@@ -195,7 +196,7 @@ sh run.sh save_inference_model
同时裁剪后的模型使用方法详见```inference_model.py```,测试命令如下:
```shell
python inference_model.py
python inference_model.py
```
......
......@@ -5,6 +5,8 @@
## 1. 任务说明
本文主要介绍基于lstm的语言的模型的实现,给定一个输入词序列(中文分词、英文tokenize),计算其ppl(语言模型困惑度,用户表示句子的流利程度),基于循环神经网络语言模型的介绍可以[参阅论文](https://arxiv.org/abs/1409.2329)。相对于传统的方法,基于循环神经网络的方法能够更好的解决稀疏词的问题。
同时推荐用户参考[IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122290)
## 2. 效果说明
在small meidum large三个不同配置情况的ppl对比:
......
......@@ -3,6 +3,8 @@
[BERT](https://arxiv.org/abs/1810.04805) 是一个迁移能力很强的通用语义表示模型, 以 [Transformer](https://arxiv.org/abs/1706.03762) 为网络基本组件,以双向 `Masked Language Model`
`Next Sentence Prediction` 为训练目标,通过预训练得到通用语义表示,再结合简单的输出层,应用到下游的 NLP 任务,在多个任务上取得了 SOTA 的结果。本项目是 BERT 在 Paddle Fluid 上的开源实现。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122282)
### 发布要点
1)完整支持 BERT 模型训练到部署, 包括:
......@@ -79,7 +81,7 @@
我们给出了 token 化后的示例明文数据: [`demo_wiki_tokens.txt`](./data/demo_wiki_tokens.txt),其中每行数据为2个 tab 分隔的句子,示例如下:
```
1 . 雏 凤 鸣 剧 团 2 . 古 典 之 门 : 帝 女 花 3 . 戏 曲 之 旅 : 第 155 期 心 系 唐 氏 慈 善 戏 曲 晚 会 4 . 区 文 凤 , 郑 燕 虹 1999 编 , 香 港 当 代 粤 剧 人 名 录 , 中 大 音 乐 系 5 . 王 胜 泉 , 张 文 珊 2011 编 , 香 港 当 代 粤 剧 人 名 录 , 中 大 音 乐 系
1 . 雏 凤 鸣 剧 团 2 . 古 典 之 门 : 帝 女 花 3 . 戏 曲 之 旅 : 第 155 期 心 系 唐 氏 慈 善 戏 曲 晚 会 4 . 区 文 凤 , 郑 燕 虹 1999 编 , 香 港 当 代 粤 剧 人 名 录 , 中 大 音 乐 系 5 . 王 胜 泉 , 张 文 珊 2011 编 , 香 港 当 代 粤 剧 人 名 录 , 中 大 音 乐 系
```
同时我们也给出了 id 化后的部分训练数据:[`demo_wiki_train.gz`](./data/train/demo_wiki_train.gz)、和测试数据:[`demo_wiki_validation.gz`](./data/validation/demo_wiki_validation.gz),每行数据为1个训练样本,示例如下:
......
......@@ -4,6 +4,7 @@
ELMo(Embeddings from Language Models) 是重要的通用语义表示模型之一,以双向 LSTM 为网路基本组件,以 Language Model 为训练目标,通过预训练得到通用的语义表示,将通用的语义表示作为 Feature 迁移到下游 NLP 任务中,会显著提升下游任务的模型性能。本项目是 ELMo 在 Paddle Fluid 上的开源实现, 基于百科类数据训练并发布了预训练模型。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/124374)
### 发布要点:
1) 基于百科类数据训练的 [ELMo 中文预训练模型](https://dureader.gz.bcebos.com/elmo/baike_elmo_checkpoint.tar.gz);
......
......@@ -25,6 +25,8 @@
本项目是机器翻译领域主流模型 Transformer 的 PaddlePaddle 实现, 包含模型训练,预测以及使用自定义数据等内容。用户可以基于发布的内容搭建自己的翻译模型。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122281)
## 快速开始
### 安装说明
......
......@@ -2,11 +2,14 @@
## 简介
### 任务说明
短文本语义匹配(SimilarityNet, SimNet)是一个计算短文本相似度的框架,可以根据用户输入的两个文本,计算出相似度得分。SimNet框架在百度各产品上广泛应用,主要包括BOW、CNN、RNN、MMDNN等核心网络结构形式,提供语义相似度计算训练和预测框架,适用于信息检索、新闻推荐、智能客服等多个应用场景,帮助企业解决语义匹配问题。可通过[AI开放平台-短文本相似度](https://ai.baidu.com/tech/nlp_basic/simnet)线上体验。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/124373)
### 效果说明
基于百度海量搜索数据,我们训练了一个SimNet-BOW-Pairwise语义匹配模型,在一些真实的FAQ问答场景中,该模型效果比基于字面的相似度方法AUC提升5%以上,我们基于百度自建测试集(包含聊天、客服等数据集)和语义匹配数据集(LCQMC)进行评测,效果如下表所示。LCQMC数据集以Accuracy为评测指标,而pairwise模型的输出为相似度,因此我们采用0.958作为分类阈值,相比于基线模型中网络结构同等复杂的CBOW模型(准确率为0.737),我们模型的准确率为0.7532。
| 模型 | 百度知道 | ECOM |QQSIM | UNICOM |
| 模型 | 百度知道 | ECOM |QQSIM | UNICOM |
|:-----------:|:-------------:|:-------------:|:-------------:|:-------------:|
| | AUC | AUC | AUC|正逆序比|
|BOW_Pairwise|0.6767|0.7329|0.7650|1.5630|
......@@ -60,7 +63,7 @@ sh run.sh infer
#### 训练与验证
用户可以基于示例数据构建训练集和开发集,可以运行下面的命令,进行模型训练和开发集验证。
```shell
sh run.sh train
sh run.sh train
```
用户也可以指定./run.sh中train()函数里的INIT_CHECKPOINT的值,载入训练好的模型进行热启动训练。
## 进阶使用
......
......@@ -3,3 +3,5 @@
## 简介
我们提供了常见的ctr任务中使用的模型,包括[dnn](https://github.com/PaddlePaddle/models/tree/develop/PaddleRec/ctr/dnn)[deepfm](https://github.com/PaddlePaddle/models/tree/develop/PaddleRec/ctr/deepfm)[xdeepfm](https://github.com/PaddlePaddle/models/tree/develop/PaddleRec/ctr/xdeepfm)[dcn](https://github.com/PaddlePaddle/models/tree/develop/PaddleRec/ctr/dcn)
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/124378)
......@@ -33,6 +33,8 @@ SR-GNN模型的介绍可以参阅论文[Session-based Recommendation with Graph
**目前模型库下模型均要求使用PaddlePaddle 1.6及以上版本或适当的develop版本。**
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/124382)
## 数据下载及预处理
使用[DIGINETICA](http://cikm2016.cs.iupui.edu/cikm-cup)数据集。可以按照下述过程操作获得数据集以及进行简单的数据预处理。
......
......@@ -44,6 +44,9 @@ session-based推荐应用场景非常广泛,比如用户的商品浏览、新
运行样例程序可跳过'RSC15 数据下载及预处理'部分
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122296)
## RSC15 数据下载及预处理
运行命令 下载RSC15官网数据集
......
......@@ -3,6 +3,8 @@
## 介绍
在个性化推荐场景中,推荐系统给用户提供的项目(Item)列表通常是通过个性化的匹配模型计算出来的。在现实世界中,一个用户可能有很多个视角的特征,比如用户Id,年龄,项目的点击历史等。一个项目,举例来说,新闻资讯,也会有多种视角的特征比如新闻标题,新闻类别等。多视角Simnet模型是可以融合用户以及推荐项目的多个视角的特征并进行个性化匹配学习的一体化模型。这类模型在很多工业化的场景中都会被使用到,比如百度的Feed产品中。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122294)
## 数据集
目前,本项目使用机器生成的数据集来介绍多视角Simnet模型的概念,未来我们会逐渐加入真是世界中的数据集并在这个模型上进行效果验证。由于数据的原因,训练结果不准确。
......@@ -15,7 +17,7 @@
```bash
python train.py
```
##
## 预测
如下
如下命令行可以获得预测工具的具体选项,`python infer -h`内容可以参考说明
```bash
......
......@@ -3,6 +3,8 @@
## Introduction
In personalized recommendation scenario, a user often is provided with several items from personalized interest matching model. In real world application, a user may have multiple views of features, say user-id, age, click-history of items, search queries. A item, e.g. news, may also have multiple views of features like news title, news category, images in news and so on. Multi-view Simnet is matching a model that combine users' and items' multiple views of features into one unified model. The model can be used in many industrial product like Baidu's feed news. The model is adapted from the paper A Multi-View Deep Learning(MV-DNN) Approach for Cross Domain User Modeling in Recommendation Systems, WWW 2015. The difference between our model and the MV-DNN is that we also consider multiple feature views of users.
We also recommend users to take a look at the [IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122294)
## Dataset
Currently, synthetic dataset is provided for proof of concept and we aim to add more real world dataset in this project in the future. The result is inaccurate because of synthetic dataset.
......
......@@ -26,6 +26,7 @@ TagSpace模型的介绍可以参阅论文[#TagSpace: Semantic Embeddings from Ha
Tagspace模型学习文本及标签的embedding表示,应用于工业级的标签推荐,具体应用场景有feed新闻标签推荐。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/122298)
## 数据下载及预处理
......
......@@ -20,6 +20,7 @@
## 介绍
本例实现了skip-gram模式的word2vector模型。
同时推荐用户参考[ IPython Notebook demo](https://aistudio.baidu.com/aistudio/projectDetail/124377)
## 数据下载
全量数据集使用的是来自1 Billion Word Language Model Benchmark的(http://www.statmt.org/lm-benchmark) 的数据集.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册