diff --git a/chapter_appendix/gluonbook.md b/chapter_appendix/gluonbook.md index 09c366a4b1cf71865db589dcc16d69aea0dac10a..3d0c817d3c776a298cdb5885707809467c3c1d2e 100644 --- a/chapter_appendix/gluonbook.md +++ b/chapter_appendix/gluonbook.md @@ -9,8 +9,8 @@ | `bbox_to_rect`|[物体检测和边界框](../chapter_computer-vision/bounding-box.md)| | `count_tokens`|[文本情感分类:使用循环神经网络](../chapter_natural-language-processing/sentiment-analysis.md)| | `data_iter`|[线性回归的从零开始实现](../chapter_deep-learning-basics/linear-regression-scratch.md)| -| `data_iter_consecutive`|[循环神经网络](../chapter_recurrent-neural-networks/rnn.md)| -| `data_iter_random`|[循环神经网络](../chapter_recurrent-neural-networks/rnn.md)| +| `data_iter_consecutive`|[语言模型数据集(周杰伦专辑歌词)](../chapter_recurrent-neural-networks/lang-model-dataset.md)| +| `data_iter_random`|[语言模型数据集(周杰伦专辑歌词)](../chapter_recurrent-neural-networks/lang-model-dataset.md)| | `download_imdb`|[文本情感分类:使用循环神经网络](../chapter_natural-language-processing/sentiment-analysis.md)| | `download_voc_pascal`|[语义分割和数据集](../chapter_computer-vision/semantic-segmentation-and-dataset.md)| | `evaluate_accuracy`|[图片增广](../chapter_computer-vision/image-augmentation.md)| @@ -20,7 +20,7 @@ | `grad_clipping`|[循环神经网络](../chapter_recurrent-neural-networks/rnn.md)| | `linreg`|[线性回归的从零开始实现](../chapter_deep-learning-basics/linear-regression-scratch.md)| | `load_data_fashion_mnist`|[深度卷积神经网络(AlexNet)](../chapter_convolutional-neural-networks/alexnet.md)| -| `load_data_pikachu`|[物体检测数据集](../chapter_computer-vision/object-detection-dataset.md)| +| `load_data_pikachu`|[物体检测数据集(皮卡丘)](../chapter_computer-vision/object-detection-dataset.md)| | `optimize`|[梯度下降和随机梯度下降](../chapter_optimization/gd-sgd.md)| | `optimize_with_trainer`|[梯度下降和随机梯度下降](../chapter_optimization/gd-sgd.md)| | `plt`|[线性回归的从零开始实现](../chapter_deep-learning-basics/linear-regression-scratch.md)| diff --git a/chapter_computer-vision/object-detection-dataset.md b/chapter_computer-vision/object-detection-dataset.md index 6153f4bf2c9f4d696e6d78b62b89035973f86361..0d2a79baf1cd8c75b8d266ac39e99f18e84c94ba 100644 --- a/chapter_computer-vision/object-detection-dataset.md +++ b/chapter_computer-vision/object-detection-dataset.md @@ -1,4 +1,4 @@ -# 物体检测数据集 +# 物体检测数据集(皮卡丘) 在物体检测领域并没有类似MNIST那样的小数据集方便我们快速测试模型。为此我们合成了一个小的人工数据集。我们首先使用一个开源的皮卡丘3D模型生成1000张不同角度和大小的图片。然后我们收集了一系列背景图片,并在每张图的随机位置放置一张皮卡丘图片。我们使用MXNet提供的[tools/im2rec.py](https://github.com/apache/incubator-mxnet/blob/master/tools/im2rec.py)来将图片打包成二进制rec文件。(这是MXNet在Gluon开发出来之前常用的数据格式。注意GluonCV这个包里已经提供了更简单的类似之前我们读取图片的函数,从而可以省略打包图片的步骤。但由于这个工具包目前仍在快速开发迭代中,这里我们仍使用rec格式。) diff --git a/chapter_recurrent-neural-networks/lang-model-dataset.md b/chapter_recurrent-neural-networks/lang-model-dataset.md index e40dfb6ef24fb2ca84fe283797309cef6d583c0c..7b61011919fc7b1fe34112712ccbf193aa510f3c 100644 --- a/chapter_recurrent-neural-networks/lang-model-dataset.md +++ b/chapter_recurrent-neural-networks/lang-model-dataset.md @@ -7,9 +7,9 @@ 首先导入本节所需的包和模块。 ```{.python .input n=1} +from mxnet import nd import random import zipfile -from mxnet import nd ``` 然后读取这个数据集,看看前50个字符是什么样的。 @@ -114,13 +114,18 @@ for X, Y in data_iter_consecutive(my_seq, batch_size=2, num_steps=6): print('X: ', X, '\nY:', Y, '\n') ``` -同样,`data_iter_random`和`data_iter_consecutive`也保存在GluonBook里以供后面章节需要。 +本节定义的`data_iter_random`和`data_iter_consecutive`函数被保存在`gluonbook`包里以供后面章节调用。 + ## 小结 -时序数据采样方式包括随机采样和相邻采样。使用这两种方式的循环神经网络训练略有不同。 +* 时序数据采样方式包括随机采样和相邻采样。使用这两种方式的循环神经网络训练略有不同。 ## 练习 * 你还能想到哪些采样小批量数据的办法? * 如果我们想让一个序列样本就是一个完整的句子,这会给小批量采样带来什么样的问题? + +## 扫码直达[讨论区](https://discuss.gluon.ai/t/topic/7876) + +![](../img/qr_lang-model-dataset.svg) diff --git a/img/qr_lang-model-dataset.svg b/img/qr_lang-model-dataset.svg new file mode 100644 index 0000000000000000000000000000000000000000..40b7a0eadcdb2dd20ee9c566ddb4645a66858abd --- /dev/null +++ b/img/qr_lang-model-dataset.svg @@ -0,0 +1,428 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file