From bbdfb6ca79423caa6f0ca74445a9888aa3918b99 Mon Sep 17 00:00:00 2001 From: lvmingfu Date: Mon, 18 Jan 2021 11:09:24 +0800 Subject: [PATCH] fix error links for master --- mindspore/nn/probability/README.md | 105 ++++++++++-------- model_zoo/official/cv/deeptext/README.md | 10 +- model_zoo/official/cv/psenet/README.md | 2 +- model_zoo/official/cv/psenet/README_CN.md | 2 +- .../lite/image_segmentation/README.en.md | 8 +- .../lite/image_segmentation/README.md | 6 +- model_zoo/official/nlp/prophetnet/README.md | 2 +- .../research/audio/deepspeech2/README.md | 4 +- model_zoo/research/audio/fcn-4/README.md | 2 +- 9 files changed, 79 insertions(+), 62 deletions(-) diff --git a/mindspore/nn/probability/README.md b/mindspore/nn/probability/README.md index 7e26e4a0fb..e5bfcb0774 100644 --- a/mindspore/nn/probability/README.md +++ b/mindspore/nn/probability/README.md @@ -1,4 +1,4 @@ -## MindSpore Deep Probabilistic Programming +# MindSpore Deep Probabilistic Programming ![MindSpore+ZhuSuan](https://images.gitee.com/uploads/images/2020/0814/172009_ff0cdc1a_6585083.png "MS-Zhusuan.PNG") @@ -6,46 +6,47 @@ MindSpore Deep Probabilistic Programming (MDP) is a programming library for Baye The objective of MDP is to integrate deep learning with Bayesian learning. On the one hand, similar to other Deep Probabilistic Programming Languages (DPPL) (e.g., TFP, Pyro), for the professional Bayesian learning researchers, MDP provides probability sampling, inference algorithms, and model building libraries; On the other hand, MDP provides high-level APIs for DNN researchers that are unfamiliar with Bayesian models, making it possible to take advantage of Bayesian models without the need of changing their DNN programming logics. +## Layer 0: High performance kernels for different platforms - **Layer 0: High performance kernels for different platforms** +- Random sampling kernels; +- Mathematical kernels that are used by Bayesian models. - - Random sampling kernels; - - Mathematical kernels that are used by Bayesian models. +## Layer 1: Probabilistic Programming (PP) focuses on professional Bayesian learning - **Layer 1: Probabilistic Programming (PP) focuses on professional Bayesian learning** - - **Layer 1-1: Statistical distributions classes used to generate stochastic tensors** +### Layer 1-1: Statistical distributions classes used to generate stochastic tensors - Distributions ([mindspore.nn.probability.distribution](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/distribution)): A large collection of probability distributions. - Bijectors([mindspore.nn.probability.bijectors](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/bijector)): Reversible and composable transformations of random variables. - **Layer 1-2: Probabilistic inference algorithms** - +### Layer 1-2: Probabilistic inference algorithms - SVI([mindspore.nn.probability.infer.variational](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/infer/variational)): A unified interface for stochastic variational inference. - MC: Algorithms for approximating integrals via sampling. - **Layer 2: Deep Probabilistic Programming (DPP) aims to provide composable BNN modules** +## Layer 2: Deep Probabilistic Programming (DPP) aims to provide composable BNN modules - Layers([mindspore.nn.probability.bnn_layers](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/bnn_layers)): BNN layers, which are used to construct BNN. - Dpn([mindspore.nn.probability.dpn](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/dpn)): A bunch of BNN models that allow to be integrated into DNN; - Transform([mindspore.nn.probability.transforms](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/transforms)): Interfaces for the transformation between BNN and DNN; - Context: context managers for models and layers. - **Layer 3: Toolbox provides a set of BNN tools for some specific applications** +## Layer 3: Toolbox provides a set of BNN tools for some specific applications + - Uncertainty Estimation([mindspore.nn.probability.toolbox.uncertainty_evaluation](https://gitee.com/mindspore/mindspore/tree/master/mindspore/nn/probability/toolbox/uncertainty_evaluation.py)): Interfaces to estimate epistemic uncertainty and aleatoric uncertainty. - OoD detection: Interfaces to detect out of distribution samples. ![Structure of MDP](https://images.gitee.com/uploads/images/2020/0820/115117_2a20da64_7825995.png "MDP.png") MDP requires MindSpore version 0.7.0-beta or later. MDP is actively evolving. Interfaces may change as Mindspore releases are iteratively updated. -### Tutorial - **Bayesian Neural Network** +## Tutorial + +### Bayesian Neural Network + 1. Process the required dataset. The MNIST dateset is used in the example. Data processing is consistent with [Implementing an Image Classification Application](https://www.mindspore.cn/tutorial/training/en/master/quick_start/quick_start.html) in Tutorial. 2. Define a Bayesian Neural Network. The bayesian LeNet is used in this example. -``` +```python import mindspore.nn as nn from mindspore.nn.probability import bnn_layers import mindspore.ops.operations as P @@ -91,12 +92,14 @@ class BNNLeNet5(nn.Cell): x = self.fc3(x) return x ``` + The way to construct Bayesian Neural Network by bnn_layers is the same as DNN. It's worth noting that bnn_layers and traditional layers of DNN can be combined with each other. 3. Define the Loss Function and Optimizer + The loss function `SoftmaxCrossEntropyWithLogits` and the optimizer `AdamWeightDecay` are used in the example. Call the loss function and optimizer in the `__main__` function. -``` +```python if __name__ == "__main__": ... # define the loss function @@ -106,10 +109,11 @@ if __name__ == "__main__": ``` 4. Train the Network -The process of Bayesian network training is basically the same as that of DNN, the only differance is that WithLossCell is replaced with WithBNNLossCell suitable for BNN. + +The process of Bayesian network training is basically the same as that of DNN, the only difference is that WithLossCell is replaced with WithBNNLossCell suitable for BNN. Based on the two parameters `backbone` and `loss_fn` in WithLossCell, WithBNNLossCell adds two parameters of `dnn_factor` and `bnn_factor`. Those two parameters are used to trade off backbone's loss and kl loss to prevent kl loss from being too large to cover backbone's loss. -``` +```python from mindspore.nn import TrainOneStepCell if __name__ == "__main__": @@ -133,7 +137,7 @@ if __name__ == "__main__": The `train_model` and `validate_model` are defined as follows: -``` +```python import numpy as np def train_model(train_net, net, dataset): @@ -168,10 +172,11 @@ def validate_model(net, dataset): return acc_mean ``` - **Variational Inference** +### Variational Inference + 1. Define the Variational Auto-Encoder, we only need to self-define the encoder and decoder(DNN model). -``` +```python import mindspore.nn as nn from mindspore.ops import operations as P from mindspore.nn.probability.dpn import VAE @@ -211,28 +216,31 @@ encoder = Encoder() decoder = Decoder() vae = VAE(encoder, decoder, hidden_size=400, latent_size=20) ``` + 2. Use ELBO interface to define the loss function and define the optimizer, then construct the cell_net using WithLossCell. -``` +```python from mindspore.nn.probability.infer import ELBO net_loss = ELBO(latent_prior='Normal', output_prior='Normal') optimizer = nn.Adam(params=vae.trainable_params(), learning_rate=0.001) net_with_loss = nn.WithLossCell(vae, net_loss) ``` + 3. Process the required dataset. The MNIST dateset is used in the example. Data processing is consistent with [Implementing an Image Classification Application](https://www.mindspore.cn/tutorial/training/en/master/quick_start/quick_start.html) in Tutorial. 4. Use SVI interface to train VAE network. vi.run can return the trained network, get_train_loss can get the loss after training. -``` +```python from mindspore.nn.probability.infer import SVI vi = SVI(net_with_loss=net_with_loss, optimizer=optimizer) vae = vi.run(train_dataset=ds_train, epochs=10) trained_loss = vi.get_train_loss() ``` + 5. Use the trained VAE network, we can generate new samples or reconstruct the input samples. -``` +```python IMAGE_SHAPE = (-1, 1, 32, 32) generated_sample = vae.generate_sample(64, IMAGE_SHAPE) for sample in ds_train.create_dict_iterator(): @@ -240,12 +248,13 @@ for sample in ds_train.create_dict_iterator(): reconstructed_sample = vae.reconstruct_sample(sample_x) ``` +### Transform DNN to BNN - **Transform DNN to BNN** For DNN researchers who are unfamiliar with Bayesian models, MDP provides high-level APIs `TransformToBNN` to support one-click conversion of DNN models to BNN models. + 1. Define a Deep Neural Network. The LeNet is used in this example. -``` +```python from mindspore.common.initializer import TruncatedNormal import mindspore.nn as nn import mindspore.ops.operations as P @@ -314,7 +323,7 @@ class LeNet5(nn.Cell): 2. Wrap DNN by TrainOneStepCell -``` +```python from mindspore.nn import WithLossCell, TrainOneStepCell if __name__ == "__main__": @@ -328,9 +337,10 @@ if __name__ == "__main__": ``` 3. Instantiate class `TransformToBNN` + The `__init__` of `TransformToBNN` are as follows: -``` +```python class TransformToBNN: def __init__(self, trainable_dnn, dnn_factor=1, bnn_factor=1): net_with_loss = trainable_dnn.network @@ -341,9 +351,10 @@ class TransformToBNN: self.bnn_factor = bnn_factor self.bnn_loss_file = None ``` + The arg `trainable_dnn` specifies a trainable DNN model wrapped by TrainOneStepCell, `dnn_factor` is the coefficient of backbone's loss, which is computed by loss function, and `bnn_factor` is the coefficient of kl loss, which is kl divergence of Bayesian layer. `dnn_factor` and `bnn_factor` are used to trade off backbone's loss and kl loss to prevent kl loss from being too large to cover backbone's loss. -``` +```python from mindspore.nn.probability import transforms if __name__ == "__main__": @@ -355,7 +366,7 @@ if __name__ == "__main__": 3-1. Transform the whole model The method `transform_to_bnn_model` can transform both convolutional layer and full connection layer of DNN model to BNN model. Its code is as follows: -``` +```python def transform_to_bnn_model(self, get_dense_args=lambda dp: {"in_channels": dp.in_channels, "has_bias": dp.has_bias, "out_channels": dp.out_channels, "activation": dp.activation}, @@ -382,9 +393,10 @@ The method `transform_to_bnn_model` can transform both convolutional layer and f Cell, a trainable BNN model wrapped by TrainOneStepCell. """ ``` + Arg `get_dense_args` specifies which arguments to be gotten from full connection layer of DNN. Its Default value contains arguments common to nn.Dense and DenseReparameterization. Arg `get_conv_args` specifies which arguments to be gotten from convolutional layer of DNN. Its Default value contains arguments common to nn.Con2d and ConvReparameterization. Arg `add_dense_args` and `add_conv_args` specify which arguments to be add to full connection layer and convolutional layer of BNN. Note that the parameters in `add_dense_args` cannot be repeated with `get_dense_args`, so do `add_conv_args` and `get_conv_args`. -``` +```python if __name__ == "__main__": ... train_bnn_network = bnn_transformer.transform_to_bnn_model() @@ -394,7 +406,7 @@ if __name__ == "__main__": 3-2. Transform a specific type of layers The method `transform_to_bnn_layer` can transform a specific type of layers (nn.Dense or nn.Conv2d) in DNN model to corresponding BNN layer. Its code is as follows: -``` +```python def transform_to_bnn_layer(self, dnn_layer, bnn_layer, get_args=None, add_args=None): r""" Transform a specific type of layers in DNN model to corresponding BNN layer. @@ -411,20 +423,23 @@ The method `transform_to_bnn_layer` can transform a specific type of layers (nn. Cell, a trainable model wrapped by TrainOneStepCell, whose sprcific type of layer is transformed to the corresponding bayesian layer. """ ``` + Arg `dnn_layer` specifies which type of DNN layer to be transformed to BNN layer. The optional values are nn.Dense and nn.Conv2d. Arg `bnn_layer` specifies which type of BNN layer to be transformed to. The value should correspond to dnn_layer. Arg `get_args` and `add_args` specify the arguments gotten from DNN layer and the new arguments added to BNN layer respectively. -``` +```python if __name__ == "__main__": ... train_bnn_network = bnn_transformer.transform_to_bnn_layer() ... ``` -**Uncertainty Evaluation** +### Uncertainty Evaluation + The uncertainty estimation toolbox is based on MindSpore Deep Probabilistic Programming (MDP), and it is suitable for mainstream deep learning models, such as regression, classification, target detection and so on. In the inference stage, with the uncertainy estimation toolbox, developers only need to pass in the trained model and training dataset, specify the task and the samples to be estimated, then can obtain the aleatoric uncertainty and epistemic uncertainty. Based the uncertainty information, developers can understand the model and the dataset better. In classification task, for example, the model is lenet model. The MNIST dateset is used in the example. Data processing is consistent with [Implementing an Image Classification Application](https://www.mindspore.cn/tutorial/training/en/master/quick_start/quick_start.html) in Tutorial. For evaluating the uncertainty of test examples, the use of the toolbox is as follows: -``` + +```python from mindspore.nn.probability.toolbox.uncertainty_evaluation import UncertaintyEvaluation from mindspore.train.serialization import load_checkpoint, load_param_into_net @@ -448,18 +463,20 @@ for eval_data in ds_eval.create_dict_iterator(): aleatoric_uncertainty = evaluation.eval_aleatoric_uncertainty(eval_data) ``` +## Examples +Examples in [mindspore/tests/st/probability](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability) are as follows: -### Examples -Examples in [mindspore/tests/st/probability](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability) are as follows: -- [Bayesian LeNet](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability/bnn_layers/test_bnn_layer.py). How to construct and train a LeNet by bnn layers. -- [Transform whole DNN model to BNN](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability/transforms/test_transform_bnn_model.py): How to transform whole DNN model to BNN. -- [Transform DNN layer to BNN](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability/transforms/test_transform_bnn_layer.py): How to transform one certainty type of layer in DNN model to corresponding Bayesian layer. -- [Variational Auto-Encoder](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability/dpn/test_gpu_svi_vae.py): Variational Auto-Encoder (VAE) model trained with MNIST to generate sample images. -- [Conditional Variational Auto-Encoder](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability/dpn/test_gpu_svi_cvae.py): Conditional Variational Auto-Encoder (CVAE) model trained with MNIST to generate sample images. -- [VAE-GAN](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability/dpn/test_gpu_vae_gan.py): VAE-GAN model trained with MNIST to generate sample images. -- [Uncertainty Estimation](https://gitee.com/mindspore/mindspore/tree/master/tests/st/probability/toobox/test_uncertainty.py): Evaluate uncertainty of model and data.. +- [Bayesian LeNet](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability/bnn_layers/test_bnn_layer.py). How to construct and train a LeNet by bnn layers. +- [Transform whole DNN model to BNN](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability/transforms/test_transform_bnn_model.py): How to transform whole DNN model to BNN. +- [Transform DNN layer to BNN](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability/transforms/test_transform_bnn_layer.py): How to transform one certainty type of layer in DNN model to corresponding Bayesian layer. +- [Variational Auto-Encoder](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability/dpn/test_gpu_svi_vae.py): Variational Auto-Encoder (VAE) model trained with MNIST to generate sample images. +- [Conditional Variational Auto-Encoder](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability/dpn/test_gpu_svi_cvae.py): Conditional Variational Auto-Encoder (CVAE) model trained with MNIST to generate sample images. +- [VAE-GAN](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability/dpn/test_gpu_vae_gan.py): VAE-GAN model trained with MNIST to generate sample images. +- [Uncertainty Estimation](https://gitee.com/mindspore/mindspore/blob/master/tests/st/probability/toolbox/test_uncertainty.py): Evaluate uncertainty of model and data. + +## Community -### Community As part of MindSpore, we are committed to creating an open and friendly environment. + - [Gitee](https://gitee.com/mindspore/mindspore/issues): Report bugs or make feature requests. diff --git a/model_zoo/official/cv/deeptext/README.md b/model_zoo/official/cv/deeptext/README.md index 830d018e7a..bb6d20b6c5 100644 --- a/model_zoo/official/cv/deeptext/README.md +++ b/model_zoo/official/cv/deeptext/README.md @@ -20,7 +20,7 @@ # [DeepText Description](#contents) -DeepText is a convolutional neural network architecture for text detection in non-specific scenarios. The DeepText system is based on the elegant framwork of Faster R-CNN. This idea was proposed in the paper "DeepText: A new approach for text proposal generation and text detection in natural images.", published in 2017. +DeepText is a convolutional neural network architecture for text detection in non-specific scenarios. The DeepText system is based on the elegant framework of Faster R-CNN. This idea was proposed in the paper "DeepText: A new approach for text proposal generation and text detection in natural images.", published in 2017. [Paper](https://arxiv.org/pdf/1605.07314v1.pdf) Zhuoyao Zhong, Lianwen Jin, Shuangping Huang, South China University of Technology (SCUT), Published in ICASSP 2017. @@ -74,7 +74,7 @@ Here we used 4 datasets for training, and 1 datasets for Evaluation. ├─anchor_genrator.py # anchor generator ├─bbox_assign_sample.py # proposal layer for stage 1 ├─bbox_assign_sample_stage2.py # proposal layer for stage 2 - ├─deeptext_vgg16.py # main network defination + ├─deeptext_vgg16.py # main network definition ├─proposal_generator.py # proposal generator ├─rcnn.py # rcnn ├─roi_align.py # roi_align cell wrapper @@ -83,7 +83,7 @@ Here we used 4 datasets for training, and 1 datasets for Evaluation. ├─config.py # training configuration ├─dataset.py # data proprocessing ├─lr_schedule.py # learning rate scheduler - ├─network_define.py # network defination + ├─network_define.py # network definition └─utils.py # some functions which is commonly used ├─eval.py # eval net ├─export.py # export checkpoint, surpport .onnx, .air, .mindir convert @@ -187,7 +187,7 @@ class 1 precision is 88.01%, recall is 82.77% | Loss Function | SoftmaxCrossEntropyWithLogits for classification, SmoothL2Loss for bbox regression| | Loss | ~0.008 | | Total time (8p) | 4h | -| Scripts | [deeptext script](https://gitee.com/mindspore/mindspore/tree/r1.1/mindspore/official/cv/deeptext) | +| Scripts | [deeptext script](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/cv/deeptext) | #### Inference Performance @@ -219,4 +219,4 @@ We set seed to 1 in train.py. # [ModelZoo Homepage](#contents) -Please check the official [homepage](https://gitee.com/mindspore/mindspore/tree/master/model_zoo). \ No newline at end of file +Please check the official [homepage](https://gitee.com/mindspore/mindspore/tree/master/model_zoo). diff --git a/model_zoo/official/cv/psenet/README.md b/model_zoo/official/cv/psenet/README.md index c2a2e17fd5..5b473f888a 100644 --- a/model_zoo/official/cv/psenet/README.md +++ b/model_zoo/official/cv/psenet/README.md @@ -197,7 +197,7 @@ Calculated!{"precision": 0.814796668299853, "recall": 0.8006740491092923, "hmean | Total time | 1pc: 75.48 h; 8pcs: 10.01 h | | Parameters (M) | 27.36 | | Checkpoint for Fine tuning | 109.44M (.ckpt file) | -| Scripts | | +| Scripts | | ### Inference Performance diff --git a/model_zoo/official/cv/psenet/README_CN.md b/model_zoo/official/cv/psenet/README_CN.md index 39792a0b0f..c2f40f8f8d 100644 --- a/model_zoo/official/cv/psenet/README_CN.md +++ b/model_zoo/official/cv/psenet/README_CN.md @@ -195,7 +195,7 @@ Calculated!{"precision": 0.8147966668299853,"recall":0.8006740491092923,"h | 总时间 | 1卡:75.48小时;4卡:18.87小时| | 参数(M) | 27.36 | | 微调检查点 | 109.44M (.ckpt file) | -| 脚本 | | +| 脚本 | | ### 推理性能 diff --git a/model_zoo/official/lite/image_segmentation/README.en.md b/model_zoo/official/lite/image_segmentation/README.en.md index 18ff452fd9..6cc2372d67 100644 --- a/model_zoo/official/lite/image_segmentation/README.en.md +++ b/model_zoo/official/lite/image_segmentation/README.en.md @@ -159,7 +159,7 @@ In this example, the download.gradle File configuration auto download `deeplabv Note: if the automatic download fails, please manually download the relevant library files and put them in the corresponding location. -deeplabv3.ms [deeplabv3.ms]( https://download.mindspore.cn/model_zoo/official/lite/deeplabv3_openimage_lite/deeplabv3.ms) +deeplabv3.ms [deeplabv3.ms](https://download.mindspore.cn/model_zoo/official/lite/deeplabv3_lite/deeplabv3.ms) ### Compiling On-Device Inference Code @@ -208,7 +208,7 @@ The inference code process is as follows. For details about the complete code, s model.freeBuffer(); return; } - // Note: when use model.freeBuffer(), the model can not be complile graph again. + // Note: when use model.freeBuffer(), the model can not be compile graph again. model.freeBuffer(); ``` @@ -266,7 +266,7 @@ The inference code process is as follows. For details about the complete code, s dstBitmap = scaleBitmapAndKeepRatio(dstBitmap, (int) resource_height, (int) resource_weight); ``` -4. The process of image and output data can refer to methods showing bellow. +4. The process of image and output data can refer to methods showing below. ```Java Bitmap scaleBitmapAndKeepRatio(Bitmap targetBmp, int reqHeightInPixels, int reqWidthInPixels) { @@ -323,7 +323,7 @@ The inference code process is as follows. For details about the complete code, s float value = inputBuffer.getFloat((y * imageWidth * NUM_CLASSES + x * NUM_CLASSES + i) * 4); if (i == 0 || value > maxVal) { maxVal = value; - // Check wether a pixel belongs to a person whose label is 15. + // Check whether a pixel belongs to a person whose label is 15. if (i == 15) { mSegmentBits[x][y] = i; } else { diff --git a/model_zoo/official/lite/image_segmentation/README.md b/model_zoo/official/lite/image_segmentation/README.md index 53b118cee6..fc8422e529 100644 --- a/model_zoo/official/lite/image_segmentation/README.md +++ b/model_zoo/official/lite/image_segmentation/README.md @@ -170,7 +170,7 @@ target_link_libraries( 从MindSpore Model Hub中下载模型文件,本示例程序中使用的终端图像分割模型文件为`deeplabv3.ms`,同样通过download.gradle脚本在APP构建时自动下载,并放置在`app/src/main/assets`工程目录下。 -> 若下载失败请手动下载模型文件,deeplabv3.ms [下载链接](https://download.mindspore.cn/model_zoo/official/lite/deeplabv3_openimage_lite/deeplabv3.ms)。 +> 若下载失败请手动下载模型文件,deeplabv3.ms [下载链接](https://download.mindspore.cn/model_zoo/official/lite/deeplabv3_lite/deeplabv3.ms)。 ### 编写端侧推理代码 @@ -219,7 +219,7 @@ target_link_libraries( model.freeBuffer(); return; } - // Note: when use model.freeBuffer(), the model can not be complile graph again. + // Note: when use model.freeBuffer(), the model can not be compile graph again. model.freeBuffer(); ``` @@ -334,7 +334,7 @@ target_link_libraries( float value = inputBuffer.getFloat((y * imageWidth * NUM_CLASSES + x * NUM_CLASSES + i) * 4); if (i == 0 || value > maxVal) { maxVal = value; - // Check wether a pixel belongs to a person whose label is 15. + // Check whether a pixel belongs to a person whose label is 15. if (i == 15) { mSegmentBits[x][y] = i; } else { diff --git a/model_zoo/official/nlp/prophetnet/README.md b/model_zoo/official/nlp/prophetnet/README.md index 141b008584..b4f2a3c742 100644 --- a/model_zoo/official/nlp/prophetnet/README.md +++ b/model_zoo/official/nlp/prophetnet/README.md @@ -655,4 +655,4 @@ The model has been validated on Ascend environment, not validated on CPU and GPU # ModelZoo Homepage - [Link](https://gitee.com/mindspore/mindspore/tree/master/mindspore/model_zoo) + [Link](https://gitee.com/mindspore/mindspore/tree/master/model_zoo) diff --git a/model_zoo/research/audio/deepspeech2/README.md b/model_zoo/research/audio/deepspeech2/README.md index 412c2b81e0..f47520d99a 100644 --- a/model_zoo/research/audio/deepspeech2/README.md +++ b/model_zoo/research/audio/deepspeech2/README.md @@ -57,7 +57,7 @@ Dataset used: [LibriSpeech]() - Hardware(GPU) - Prepare hardware environment with GPU processor. - Framework - - [MindSpore](https://cmc-szv.clouddragon.huawei.com/cmcversion/index/search?searchKey=Do-MindSpore%20V100R001C00B622) + - [MindSpore](https://www.mindspore.cn/install/en) - For more information, please check the resources below: - [MindSpore tutorials](https://www.mindspore.cn/tutorial/training/en/master/index.html) - [MindSpore Python API](https://www.mindspore.cn/doc/api_python/en/master/index.html) @@ -241,7 +241,7 @@ python export.py --pre_trained_model_path='ckpt_path' | Speed | 2p 2.139s/step | | Total time: training | 2p: around 1 week; | | Checkpoint | 991M (.ckpt file) | -| Scripts | [DeepSpeech script](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/research/audio/deepspeech) | +| Scripts | [DeepSpeech script](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/research/audio/deepspeech2) | ### Inference Performance diff --git a/model_zoo/research/audio/fcn-4/README.md b/model_zoo/research/audio/fcn-4/README.md index dfd0359599..5d0fe4ddff 100644 --- a/model_zoo/research/audio/fcn-4/README.md +++ b/model_zoo/research/audio/fcn-4/README.md @@ -192,7 +192,7 @@ Parameters for both training and evaluation can be set in config.py | Speed | 1pc: 160 samples/sec; | | Total time | 1pc: 20 mins; | | Checkpoint for Fine tuning | 198.73M(.ckpt file) | -| Scripts | [music_auto_tagging script](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/official/audio/fcn-4) | +| Scripts | [music_auto_tagging script](https://gitee.com/mindspore/mindspore/tree/master/model_zoo/research/audio/fcn-4) | ## [ModelZoo Homepage](#contents)