FAQ_en.md 13.7 KB
Newer Older
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
1 2 3 4 5 6
# FAQ

<!-- TOC -->

- [FAQ](#faq)
    - [Installation](#installation)
7
        - [Installing Using pip](#installing-using-pip)
8
        - [Source Code Compilation Installation](#source-code-compilation-installation)
9 10 11 12 13 14 15 16
        - [Environment Variables](#environment-variables)
        - [Verifying the Installation](#verifying-the-installation)
    - [Supported Operators](#supported-operators)
    - [Network Models](#network-models)
    - [Platform and System](#platform-and-system)
    - [Backend Running](#backend-running)
    - [Programming Language Extensions](#programming-language-extensions)
    - [Supported Features](#supported-features)
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
17 18 19 20 21

<!-- /TOC -->

## Installation

22 23
### Installing Using pip
Q: What should I do if an error message `SSL:CERTIFICATE_VERIFY_FATLED` is displayed when I use pip to install MindSpore?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
24

25
A: Add the `--trusted-host=ms-release.obs.cn-north-4.myhuaweicloud.com` parameter to the pip installation command and try again.
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
26 27 28

<br/>

29
Q: Any specific requirements for Python version when pip install MindSpore?
Z
zhoufeng 已提交
30

31
A: MindSpore utilizes many of the new features in Python3.7+,therefore we recommend you add Python3.7.5 develop environment via `conda`.
Z
zhoufeng 已提交
32 33 34

<br/>

L
liubuyu 已提交
35 36 37 38 39 40
Q:What should I do when error `ProxyError(Cannot connect to proxy)` prompts during pip install?

A:It is generally a proxy configuration problem, you can using `export http_proxy={your_proxy}` on Ubuntu environment, and using `set http_proxy={your_proxy}` in cmd on Windows environment to config your proxy.

<br/>

Y
yingchen 已提交
41
Q: What should I do when error prompts during pip install?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
42 43 44 45 46 47

A: Please execute `pip -V` to check if pip is linked to Python3.7+. If not, we recommend you
use `python3.7 -m pip install` instead of `pip install` command.

<br/>

Y
yingchen 已提交
48
Q: What should I do if I cannot find whl package for MindInsight or MindArmour on the installation page of MindSpore website?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
49 50 51

A: You can download whl package from the official [MindSpore Website download page](https://www.mindspore.cn/versions) and manually install it via `pip install`.

52
### Source Code Compilation Installation
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
53

Y
yingchen 已提交
54
Q: What should I do if the compilation time of MindSpore source code takes too long or the process is constantly interrupted by errors?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
55

56
A: MindSpore imports third party dependencies through submodule mechanism, among which `protobuf` v3.8.0 might not have the optimal or steady download speed, it is recommended that you perform package cache in advance.
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
57 58 59

<br/>

60 61 62 63 64 65
Q: How to change installation directory of the third party libraries?

A: The third party libraries will be installed in build/mindspore/.mslib, you can change the installation directory by setting the environment variable MSLIBS_CACHE_PATH, eg. `export MSLIBS_CACHE_PATH = ~/.mslib`.

<br/>

Y
yingchen 已提交
66
Q: What should I do if the software version required by MindSpore is not the same with the Ubuntu default software version?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
67 68 69 70 71

A: At the moment some software might need manual upgrade. (**Note**:MindSpore requires Python3.7.5 and gcc7.3,the default version in Ubuntu 16.04 are Python3.5 and gcc5,whereas the one in Ubuntu 18.04 are Python3.7.3 and gcc7.4)

<br/>

Y
yingchen 已提交
72
Q: What should I do if there is a prompt `tclsh not found` when I compile MindSpore from source code?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
73 74 75

A: Please install the software manually if there is any suggestion of certain `software not found`.

76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
### Environment Variables

Q:Some frequently-used environment settings need to be reset in the newly started terminal window, which is easy to be forgotten, What should I do?

A:You can write the frequently-used environment settings to `~/.bash_profile` or `~/.bashrc` so that the settings can take effect immediately when you start a new terminal window.

### Verifying the Installation

Q: After MindSpore is installed on a CPU of a PC, an error message `the pointer[session] is null` is displayed during code verification. The specific code is as follows. How do I verify whether MindSpore is successfully installed?
```python
import numpy as np
from mindspore import Tensor
from mindspore.ops import functional as F
import mindspore.context as context

context.set_context(device_target="Ascend")
x = Tensor(np.ones([1,3,3,4]).astype(np.float32))
y = Tensor(np.ones([1,3,3,4]).astype(np.float32))
print(F.tensor_add(x,y))
```

A: After MindSpore is installed on a CPU hardware platform, run the `python -c'import mindspore'` command to check whether MindSpore is successfully installed. If no error message such as `No module named'mindspore'` is displayed, MindSpore is successfully installed. The verification code is used only to verify whether a Ascend platform is successfully installed.

## Supported Operators

Q: What can I do if the LSTM example on the official website cannot run on Ascend?

A: Currently, the LSTM runs only on a GPU or CPU and does not support the hardware environment. You can click [here](https://www.mindspore.cn/docs/en/master/operator_list.html) to view the supported operators.

<br/>

Q: When conv2d is set to (3,10), Tensor[2,2,10,10] and it runs on Ascend on ModelArts, the error message `FM_W+pad_left+pad_right-KW>=strideW` is displayed. However, no error message is displayed when it runs on a CPU. What should I do?

A: This is a TBE operator restriction that the width of x must be greater than that of the kernel. The CPU does not have this operator restriction. Therefore, no error is reported.

## Network Models

Q: Which framework models can be directly read by MindSpore? What formats are supported?

A: MindSpore uses protocol buffers (protobuf) to store training parameters and cannot directly read framework models. If you want to use the .ckpt file trained by a framework, read the parameters and then call the save_checkpoint API of MindSpore to save the file as a .ckpt file that can be read by MindSpore.

<br/>

Q: How do I use models trained by MindSpore on Ascend 310?

A: Ascend 310 supports the offline model (OM). Therefore, you need to export the Open Neural Network Exchange (ONNX) or Ascend intermediate representation (AIR) model and then convert it into OM supported by Ascend 310. For details, see [Multi-Platform Inference](https://www.mindspore.cn/tutorial/en/master/use/multi_platform_inference.html).

昇思MindSpore's avatar
fix FAQ  
昇思MindSpore 已提交
123 124
<br/>

125 126 127 128 129
Q: How do I modify parameters (such as the dropout value) on MindSpore?

A: When building a network, use `if self.training: x = dropput(x)`. During verification, set `network.set_train(mode_false)` before execution to disable the dropout function. During training, set `network.set_train(mode_false)` to True to enable the dropout function.

<br/>
昇思MindSpore's avatar
fix FAQ  
昇思MindSpore 已提交
130

131
Q: Where can I view the sample code or tutorial of MindSpore training and inference?
昇思MindSpore's avatar
fix FAQ  
昇思MindSpore 已提交
132

133
A: Please visit the [MindSpore official website](https://www.mindspore.cn/tutorial/en/master/index.html).
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
134

135
<br/>
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
136

Y
yingchen 已提交
137
Q: What types of model is currently supported by MindSpore for training?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
138 139 140

A: MindSpore has basic support for common training scenarios, please refer to [Release note](https://gitee.com/mindspore/mindspore/blob/master/RELEASE.md) for detailed information.

141 142 143 144
<br/>

Q: What are the available recommendation or text generation networks or models provided by MindSpore?

T
Ting Wang 已提交
145
A: Currently, recommendation models such as Wide & Deep, DeepFM, and NCF are under development. In the natural language processing (NLP) field, Bert\_NEZHA is available and models such as MASS are under development. You can rebuild the network into a text generation network based on the scenario requirements. Please stay tuned for updates on the [MindSpore Model Zoo](https://gitee.com/mindspore/mindspore/tree/master/model_zoo).
146

147
<br/>
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
148

149 150 151 152 153 154 155
Q: How simple can the MindSpore model training code be?

A: MindSpore provides Model APIs except for network definitions. In most scenarios, model training can be completed using only a few lines of code.

## Platform and System

Q: Can MindSpore be installed on Ascend 310?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
156

157 158 159 160 161 162 163
A: Ascend 310 can only be used for inference. MindSpore supports training on Ascend 910. The trained model can be converted into an .om model for inference on Ascend 310.

<br/>

Q: Does MindSpore require computing units such as GPUs and NPUs? What hardware support is required?

A: MindSpore currently supports CPU, GPU, Ascend, and NPU. Currently, you can try out MindSpore through Docker images on laptops or in environments with GPUs. Some models in MindSpore Model Zoo support GPU-based training and inference, and other models are being improved. For distributed parallel training, MindSpore supports multi-GPU training. You can obtain the latest information from [Road Map](https://www.mindspore.cn/docs/en/master/roadmap.html) and [project release notes](https://gitee.com/mindspore/mindspore/blob/master/RELEASE.md).
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
164 165 166

<br/>

Y
yingchen 已提交
167
Q: Does MindSpore have any plan on supporting other types of heterogeneous computing hardwares?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
168 169 170

A: MindSpore provides pluggable device management interface so that developer could easily integrate other types of heterogeneous computing hardwares like FPGA to MindSpore. We welcome more backend support in MindSpore from the community.

171 172
<br/>

173
Q: What is the relationship between MindSpore and ModelArts? Can MindSpore be used on ModelArts?
174

175
A: ModelArts is an online training and inference platform on HUAWEI CLOUD. MindSpore is a Huawei deep learning framework. You can view the tutorials on the [MindSpore official website](https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/use_on_the_cloud.html) to learn how to train MindSpore models on ModelArts.
176

177
<br/>
178 179 180

Q: Does MindSpore support Windows 10?

J
JunYuLiu 已提交
181
A: The MindSpore CPU version can be installed on Windows 10. For details about the installation procedure, please refer to the [MindSpore official website tutorial](https://www.mindspore.cn/install/en)
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202

## Backend Running

Q: What can I do if the error message `device target [CPU] is not supported in pynative mode` is displayed for the operation operator of MindSpore?

A: Currently, the PyNative mode supports only Ascend and GPU and does not support the CPU.

<br/>

Q: What can I do if the error message `Pynative run op ExpandDims failed` is displayed when the ExpandDims operator is used? The code is as follows:

```python
context.set_context(
mode=cintext.GRAPH_MODE,
device_target='ascend')
input_tensor=Tensor(np.array([[2,2],[2,2]]),mindspore.float32)
expand_dims=P.ExpandDims()
output=expand_dims(input_tensor,0)
```

A: The problem is that the Graph mode is selected but the PyNative mode is used. As a result, an error is reported. MindSpore supports the following running modes which are optimized in terms of debugging or running:
203

204 205 206 207 208 209
- PyNative mode: dynamic graph mode. In this mode, operators in the neural network are delivered and executed one by one, facilitating the compilation and debugging of the neural network model.

- Graph mode: static graph mode. In this mode, the neural network model is compiled into an entire graph and then delivered for execution. This mode uses technologies such as graph optimization to improve the running performance and facilitates large-scale deployment and cross-platform running.
You can select a proper mode and writing method to complete the training by referring to the official website [tutorial](https://www.mindspore.cn/tutorial/en/master/advanced_use/debugging_in_pynative_mode.html).

## Programming Language Extensions
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
210

Y
yingchen 已提交
211
Q: The recent announced programming language such as taichi got Python extensions that could be directly used as `import taichi as ti`. Does MindSpore have similar support?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
212 213 214 215 216

A: MindSpore supports Python native expression via `import mindspore`

<br/>

Y
yingchen 已提交
217
Q: Does MindSpore plan to support more programming languages other than Python?
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
218 219 220

A:MindSpore currently supports Python extensions,bindings for languages like C++、Rust、Julia are on the way.

221 222 223 224 225
## Supported Features

Q: Does MindSpore have a lightweight on-device inference engine?

A: MindSpore has its own on-device inference engine. In the current version, some functions of on-device inference have been open-sourced. MindSpore on-device inference engine is expected to be updated at the end of August. By then, it will be more comprehensive and powerful in terms of usability, performance, operator completeness, and third-party model support.
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
226 227 228 229 230

Q: How does MindSpore implement semantic collaboration and processing? Is the popular Formal Concept Analysis (FCA) used?

A: The MindSpore framework does not support FCA. For semantic models, you can call third-party tools to perform FCA in the data preprocessing phase. MindSpore supports Python therefore `import FCA` could do the trick.

231 232
<br/>

昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
233 234
Q: Does MindSpore have any plan or consideration on the edge and device when the training and inference functions on the cloud are relatively mature?

235
A: MindSpore is a unified cloud-edge-device training and inference framework. Edge has been considered in its design, so MindSpore can perform inference at the edge. The open-source version will support Ascend 310-based inference. The optimizations supported in the current inference stage include quantization, operator fusion, and memory overcommitment.
昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
236

237 238 239 240 241 242 243 244
<br/>

Q: How does MindSpore support automatic parallelism?

A: Automatic parallelism on CPUs and GPUs are being improved. You are advised to use the automatic parallelism feature on the Ascend 910 AI processor. Follow our open source community and apply for a MindSpore developer experience environment for trial use.

<br/>

昇思MindSpore's avatar
add faq  
昇思MindSpore 已提交
245 246 247
Q: Does MindSpore have a module that can implement object detection algorithms as TensorFlow does?

A: The TensorFlow's object detection pipeline API belongs to the TensorFlow's Model module. After MindSpore's detection models are complete, similar pipeline APIs will be provided.
248 249 250 251 252 253 254 255 256 257 258

<br/>

Q: How do I migrate scripts or models of other frameworks to MindSpore?

A: For details about script or model migration, please visit the [MindSpore official website](https://www.mindspore.cn/tutorial/en/master/advanced_use/network_migration.html).

<br/>

Q: Does MindSpore provide open-source e-commerce datasets?

259
A: No. Please stay tuned for updates on the [MindSpore official website](https://www.mindspore.cn/en).