提交 3aa00398 编写于 作者: X xuxinyu

faq package delete and change

上级 31ff1cd4
......@@ -23,6 +23,13 @@
## 安装类
### pip安装
Q:安装MindSpore版本:GPU、CUDA 10.1、0.5.0-beta、Ubuntu-x86,出现问题:`cannot open shared object file:file such file or dorectory`
A:从报错情况来看,是cublas库没有找到。一般的情况下是cublas库没有安装,或者是因为没有加入到环境变量中去。通常cublas是随着cuda以及驱动一起安装的,确认安装后把cublas所在的目录加入`LD_LIBRARY_PATH`环境变量中即可。
<br/>
Q:使用pip安装时报错:`SSL:CERTIFICATE_VERIFY_FATLED`应该怎么办?
A:在pip安装命令后添加参数 `--trusted-host=ms-release.obs.cn-north-4.myhuaweicloud.com`重试即可。
......@@ -51,8 +58,16 @@ Q:MindSpore网站安装页面找不到MindInsight和MindArmour的whl包,无
A:您可以从[MindSpore网站下载地址](https://www.mindspore.cn/versions)下载whl包,通过`pip install`命令进行安装。
<br/>
### 源码编译安装
Q:MindSpore安装:版本0.6.0-beta + Ascend 910 + Ubuntu_arm + Python3.7.5,手动下载对应版本的whl包,编译并安装gmp6.1.2。其他Python库依赖已经安装完成,执行样例失败,报错显示找不到so文件。
A:`libdatatransfer.so`动态库是`fwkacllib/lib64`目录下的,请先在`/usr/local`目录find到这个库所在的路径,然后把这个路径加到`LD_LIBRARY_PATH`环境变量中,确认设置生效后,再执行。
<br/>
Q:源码编译MindSpore过程时间过长,或时常中断该怎么办?
A:MindSpore通过submodule机制引入第三方依赖包,其中`protobuf`依赖包(v3.8.0)下载速度不稳定,建议您提前进行包缓存。
......@@ -75,12 +90,16 @@ Q:当源码编译MindSpore,提示`tclsh not found`时,应该怎么办?
A:当有此提示时说明要用户安装`tclsh`;如果仍提示缺少其他软件,同样需要安装其他软件。
<br/>
### 环境变量
Q: 一些常用的环境变量设置,在新启动的终端窗口中需要重新设置,容易忘记应该怎么办?
A: 常用的环境变量设置写入到`~/.bash_profile``~/.bashrc`中,可让环境变量设置在新启动的终端窗口中立即生效。
<br/>
### 安装验证
Q:个人电脑CPU环境安装MindSpore后验证代码时报错:`the pointer[session] is null`,具体代码如下,该如何验证是否安装成功呢?
......@@ -98,6 +117,8 @@ print(F.tensor_add(x,y))
A:CPU硬件平台安装MindSpore后测试是否安装成功,只需要执行命令:`python -c 'import mindspore'`,如果没有显示`No module named 'mindspore'`等错误即安装成功。问题中的验证代码仅用于验证Ascend平台安装是否成功。
<br/>
## 算子支持
Q:官网的LSTM示例在Ascend上跑不通
......@@ -110,17 +131,19 @@ Q:conv2d设置为(3,10),Tensor[2,2,10,10],在ModelArts上利用Ascend跑,
A:这是TBE这个算子的限制,x的width必须大于kernel的width。CPU的这个算子没有这个限制,所以不报错。
<br/>
## 网络模型
Q:MindSpore现支持直接读取哪些其他框架的模型?支持哪些格式呢
Q:MindSpore现支持直接读取哪些其他框架的模型和哪些格式呢?比如Pytorch下训练得到的pth模型可以加载到MindSpore框架下使用吗
A:MindSpore采用protbuf存储训练参数,无法直接读取其他框架的模型。如果想用其他框架训练好的ckpt文件,可以先把参数读取出来,再调用MindSpore的save_checkpoint接口,就可以保存成MindSpore可以读取的ckpt文件格式了。
A: MindSpore采用protbuf存储训练参数,无法直接读取其他框架的模型。对于模型文件本质保存的就是参数和对应的值,可以用其他框架的API将参数读取出来之后,拿到参数的键值对,然后再加载到MindSpore中使用。比如想用其他框架训练好的ckpt文件,可以先把参数读取出来,再调用MindSpore的`save_checkpoint`接口,就可以保存成MindSpore可以读取的ckpt文件格式了。
<br/>
Q:MindSpore训练的模型如何在Ascend 310 上使用
Q:用MindSpore训练出的模型如何在Ascend 310上使用?可以转换成适用于HiLens Kit用的吗
A:Ascend 310 支持OM模型,所以先导出ONNX或AIR模型,再转化为Ascend 310 支持的OM模型,具体步骤参考[多平台推理](https://www.mindspore.cn/tutorial/zh-CN/master/use/multi_platform_inference.html)
A:Ascend 310需要运行专用的OM模型,先使用MindSpore导出ONNX或AIR模型,再转化为Ascend 310支持的OM模型。具体可参考[多平台推理](https://www.mindspore.cn/tutorial/zh-CN/master/use/multi_platform_inference.html)。可以,HiLens Kit是以Ascend 310为推理核心,所以前后两个问题本质上是一样的,需要转换为OM模型.
<br/>
......@@ -152,11 +175,13 @@ Q:MindSpore模型训练代码能有多简单?
A:除去网络定义,MindSpore提供了Model类的接口,大多数场景只需几行代码就可完成模型训练。
<br/>
## 平台系统
Q:Ascend 310 不能安装MindSpore么?
A:Ascend 310只能用作推理,MindSpore支持在Ascend 910训练,训练出的模型转化为.om模型可用于Ascend 310上推理。
A:Ascend 310只能用作推理,MindSpore支持在Ascend 910训练,训练出的模型转化为OM模型可用于Ascend 310上推理。
<br/>
......@@ -182,8 +207,16 @@ Q:MindSpore是否支持Windows 10?
A:MindSpore CPU版本已经支持在Windows 10系统中安装,具体安装步骤可以查阅[MindSpore官网教程](https://www.mindspore.cn/install/)
<br/>
## 后端运行
Q:请问自己制作的黑底白字`28*28`的数字图片,使用MindSpore训练出来的模型做预测,报错提示`wrong shape of image`是怎么回事?
A:首先MindSpore训练使用的灰度图MNIST数据集。所以模型使用时对数据是有要求的,需要设置为`28*28`的灰度图,就是单通道才可以。
<br/>
Q:MindSpore的operation算子报错:`device target [CPU] is not supported in pynative mode`
A:pynative 模式目前只支持Ascend和GPU,暂时还不支持CPU。
......@@ -208,6 +241,8 @@ A:这边的问题是选择了Graph模式却使用了PyNative的写法,所以
- Graph模式:也称静态图模式或者图模式,将神经网络模型编译成一整张图,然后下发执行。该模式利用图优化等技术提高运行性能,同时有助于规模部署和跨平台运行。
用户可以参考[官网教程](https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/debugging_in_pynative_mode.html)选择合适、统一的模式和写法来完成训练。
<br/>
## 编程语言拓展
Q:最近出来的taichi编程语言有Python扩展,类似`import taichi as ti`就能直接用了,MindSpore是否也支持?
......@@ -220,11 +255,25 @@ Q:MindSpore是否(计划)支持多语言扩展?
A:MindSpore目前支持Python扩展,针对C++、Rust、Julia等语言的支持正在开发中。
<br/>
## 特性支持
Q:MindSpore并行模型训练的优势和特色有哪些?
A:MindSpore分布式训练除了支持数据并行,还支持算子级模型并行,可以对算子输入tensor进行切分并行。在此基础上支持自动并行,用户只需要写单卡脚本,就能自动切分到多个节点并行执行。
<br/>
Q:请问MindSpore实现了反池化操作了吗?类似于`nn.MaxUnpool2d` 这个反池化操作?
A:目前 MindSpore 还没有反池化相关的接口。如果用户想自己实现的话,可以通过自定义算子的方式自行开发算子,自定义算子[详见这里](https://www.mindspore.cn/tutorial/zh-CN/master/use/custom_operator.html)
<br/>
Q:MindSpore有轻量的端侧推理引擎么?
A:MindSpore有自己的端侧推理引擎,当前版本中已开源了端侧推理的部分功能。预计8月底会有更新,届时MindSpore端侧推理引擎在易用性,性能,算子完备度,以及第三方模型支持方面会更加完善和强大。
A:MindSpore轻量化推理框架MindSpore Lite已于r0.7版本正式上线,欢迎试用并提出宝贵意见,概述、教程和文档等请参考[MindSpore Lite](https://www.mindspore.cn/lite)
<br/>
......
# FAQ
<!-- TOC -->
- [FAQ](#faq)
- [Installation](#installation)
- [Installing Using pip](#installing-using-pip)
- [Source Code Compilation Installation](#source-code-compilation-installation)
- [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)
<!-- /TOC -->
This document has been transferred to a [new location](https://www.mindspore.cn/docs/en/master/FAQ.html). This page will be offline later。
## Installation
### 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?
A: Add the `--trusted-host=ms-release.obs.cn-north-4.myhuaweicloud.com` parameter to the pip installation command and try again.
<br/>
Q: Any specific requirements for Python version when pip install MindSpore?
A: MindSpore utilizes many of the new features in Python3.7+,therefore we recommend you add Python3.7.5 develop environment via `conda`.
<br/>
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/>
Q: What should I do when error prompts during pip install?
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/>
Q: What should I do if I cannot find whl package for MindInsight or MindArmour on the installation page of MindSpore website?
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`.
### Source Code Compilation Installation
Q: What should I do if the compilation time of MindSpore source code takes too long or the process is constantly interrupted by errors?
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.
<br/>
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/>
Q: What should I do if the software version required by MindSpore is not the same with the Ubuntu default software version?
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/>
Q: What should I do if there is a prompt `tclsh not found` when I compile MindSpore from source code?
A: Please install the software manually if there is any suggestion of certain `software not found`.
### 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).
<br/>
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/>
Q: Where can I view the sample code or tutorial of MindSpore training and inference?
A: Please visit the [MindSpore official website](https://www.mindspore.cn/tutorial/en/master/index.html).
<br/>
Q: What types of model is currently supported by MindSpore for training?
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.
<br/>
Q: What are the available recommendation or text generation networks or models provided by MindSpore?
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).
<br/>
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?
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).
<br/>
Q: Does MindSpore have any plan on supporting other types of heterogeneous computing hardwares?
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.
<br/>
Q: What is the relationship between MindSpore and ModelArts? Can MindSpore be used on ModelArts?
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.
<br/>
Q: Does MindSpore support Windows 10?
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)
## 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:
- 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
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?
A: MindSpore supports Python native expression via `import mindspore`
<br/>
Q: Does MindSpore plan to support more programming languages other than Python?
A:MindSpore currently supports Python extensions,bindings for languages like C++、Rust、Julia are on the way.
## 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.
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.
<br/>
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?
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.
<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/>
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.
<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?
A: No. Please stay tuned for updates on the [MindSpore official website](https://www.mindspore.cn/en).
\ No newline at end of file
# FAQ
<!-- TOC -->
- [FAQ](#faq)
- [安装类](#安装类)
- [pip安装](#pip安装)
- [源码编译安装](#源码编译安装)
- [环境变量](#环境变量)
- [安装验证](#安装验证)
- [算子支持](#算子支持)
- [网络模型](#网络模型)
- [平台系统](#平台系统)
- [后端运行](#后端运行)
- [编程语言拓展](#编程语言拓展)
- [特性支持](#特性支持)
<!-- /TOC -->
此文档已经转移到[新的位置](https://www.mindspore.cn/docs/zh-CN/master/FAQ.html),此页面后续会下线。
## 安装类
### pip安装
Q:使用pip安装时报错:`SSL:CERTIFICATE_VERIFY_FATLED`应该怎么办?
A:在pip安装命令后添加参数 `--trusted-host=ms-release.obs.cn-north-4.myhuaweicloud.com`重试即可。
<br/>
Q:pip安装MindSpore对Python版本是否有特别要求?
A:MindSpore开发过程中用到了Python3.7+的新特性,因此建议您通过`conda`工具添加Python3.7.5的开发环境。
<br/>
Q:使用pip安装时报错`ProxyError(Cannot connect to proxy)`,应该怎么办?
A:此问题一般是代理配置问题,Ubuntu环境下可通过`export http_proxy={your_proxy}`设置代理;Windows环境可以在cmd中通过`set http_proxy={your_proxy}`进行代理设置。
<br/>
Q:使用pip安装时提示错误,应该怎么办?
A:请执行`pip -V`查看是否绑定了Python3.7+。如果绑定的版本不对,建议使用`python3.7 -m pip install`代替`pip install`命令。
<br/>
Q:MindSpore网站安装页面找不到MindInsight和MindArmour的whl包,无法安装怎么办?
A:您可以从[MindSpore网站下载地址](https://www.mindspore.cn/versions)下载whl包,通过`pip install`命令进行安装。
### 源码编译安装
Q:源码编译MindSpore过程时间过长,或时常中断该怎么办?
A:MindSpore通过submodule机制引入第三方依赖包,其中`protobuf`依赖包(v3.8.0)下载速度不稳定,建议您提前进行包缓存。
<br/>
Q:如何改变第三方依赖库安装路径?
A:第三方依赖库的包默认安装在build/mindspore/.mslib目录下,可以设置环境变量MSLIBS_CACHE_PATH来改变安装目录,比如 `export MSLIBS_CACHE_PATH = ~/.mslib`
<br/>
Q:MindSpore要求的配套软件版本与Ubuntu默认版本不一致怎么办?
A:当前MindSpore只提供版本配套关系,需要您手动进行配套软件的安装升级。(**注明**:MindSpore要求Python3.7.5和gcc7.3,Ubuntu 16.04默认为Python3.5和gcc5,Ubuntu 18.04默认自带Python3.7.3和gcc7.4)。
<br/>
Q:当源码编译MindSpore,提示`tclsh not found`时,应该怎么办?
A:当有此提示时说明要用户安装`tclsh`;如果仍提示缺少其他软件,同样需要安装其他软件。
### 环境变量
Q: 一些常用的环境变量设置,在新启动的终端窗口中需要重新设置,容易忘记应该怎么办?
A: 常用的环境变量设置写入到`~/.bash_profile``~/.bashrc`中,可让环境变量设置在新启动的终端窗口中立即生效。
### 安装验证
Q:个人电脑CPU环境安装MindSpore后验证代码时报错:`the pointer[session] is null`,具体代码如下,该如何验证是否安装成功呢?
```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:CPU硬件平台安装MindSpore后测试是否安装成功,只需要执行命令:`python -c 'import mindspore'`,如果没有显示`No module named 'mindspore'`等错误即安装成功。问题中的验证代码仅用于验证Ascend平台安装是否成功。
## 算子支持
Q:官网的LSTM示例在Ascend上跑不通
A:目前LSTM只支持在GPU和CPU上运行,暂不支持硬件环境,您可以[点击这里](https://www.mindspore.cn/docs/zh-CN/master/operator_list.html)查看算子支持情况。
<br/>
Q:conv2d设置为(3,10),Tensor[2,2,10,10],在ModelArts上利用Ascend跑,报错:`FM_W+pad_left+pad_right-KW>=strideW`,CPU下不报错。
A:这是TBE这个算子的限制,x的width必须大于kernel的width。CPU的这个算子没有这个限制,所以不报错。
## 网络模型
Q:MindSpore现支持直接读取哪些其他框架的模型?支持哪些格式呢?
A:MindSpore采用protbuf存储训练参数,无法直接读取其他框架的模型。如果想用其他框架训练好的ckpt文件,可以先把参数读取出来,再调用MindSpore的save_checkpoint接口,就可以保存成MindSpore可以读取的ckpt文件格式了。
<br/>
Q:MindSpore训练的模型如何在Ascend 310 上使用?
A:Ascend 310 支持OM模型,所以先导出ONNX或AIR模型,再转化为Ascend 310 支持的OM模型,具体步骤参考[多平台推理](https://www.mindspore.cn/tutorial/zh-CN/master/use/multi_platform_inference.html)
<br/>
Q:MindSpore如何进行参数(如dropout值)修改?
A:在构造网络的时候可以通过 `if self.training: x = dropput(x)`,验证的时候,执行前设置`network.set_train(mode_false)`,就可以不适用dropout,训练时设置为True就可以使用dropout。
<br/>
Q:从哪里可以查看MindSpore训练及推理的样例代码或者教程?
A:可以访问[MindSpore官网教程](https://www.mindspore.cn/tutorial/zh-CN/master/index.html)
<br/>
Q:MindSpore支持哪些模型的训练?
A:MindSpore针对典型场景均有模型训练支持,支持情况详见[Release note](https://gitee.com/mindspore/mindspore/blob/master/RELEASE.md)
<br/>
Q:MindSpore有哪些现成的推荐类或生成类网络或模型可用?
A:目前正在开发Wide & Deep、DeepFM、NCF等推荐类模型,NLP领域已经支持Bert_NEZHA,正在开发MASS等模型,用户可根据场景需要改造为生成类网络,可以关注[MindSpore Model Zoo](https://gitee.com/mindspore/mindspore/tree/master/model_zoo)
<br/>
Q:MindSpore模型训练代码能有多简单?
A:除去网络定义,MindSpore提供了Model类的接口,大多数场景只需几行代码就可完成模型训练。
## 平台系统
Q:Ascend 310 不能安装MindSpore么?
A:Ascend 310只能用作推理,MindSpore支持在Ascend 910训练,训练出的模型转化为.om模型可用于Ascend 310上推理。
<br/>
Q:安装运行MindSpore时,是否要求平台有GPU、NPU等计算单元?需要什么硬件支持?
A:MindSpore当前支持CPU/GPU/Ascend /NPU。目前笔记本电脑或者有GPU的环境,都可以通过Docker镜像来试用。当前MindSpore Model Zoo中有部分模型已经支持GPU的训练和推理,其他模型也在不断地进行完善。在分布式并行训练方面,MindSpore当前支持GPU多卡训练。你可以通过[RoadMap](https://www.mindspore.cn/docs/zh-CN/master/roadmap.html)和项目[Release note](https://gitee.com/mindspore/mindspore/blob/master/RELEASE.md)获取最新信息。
<br/>
Q:针对异构计算单元的支持,MindSpore有什么计划?
A:MindSpore提供了可插拔式的设备管理接口,其他计算单元(比如FPGA)可快速灵活地实现与MindSpore的对接,欢迎您参与社区进行异构计算后端的开发工作。
<br/>
Q:MindSpore与ModelArts是什么关系,在ModelArts中能使用MindSpore吗?
A:ModelArts是华为公有云线上训练及推理平台,MindSpore是华为深度学习框架,可以查阅[MindSpore官网教程](https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/use_on_the_cloud.html),教程中详细展示了用户如何使用ModelArts来做MindSpore的模型训练。
<br/>
Q:MindSpore是否支持Windows 10?
A:MindSpore CPU版本已经支持在Windows 10系统中安装,具体安装步骤可以查阅[MindSpore官网教程](https://www.mindspore.cn/install/)
## 后端运行
Q:MindSpore的operation算子报错:`device target [CPU] is not supported in pynative mode`
A:pynative 模式目前只支持Ascend和GPU,暂时还不支持CPU。
<br/>
Q:使用ExpandDims算子报错:`Pynative run op ExpandDims failed`。具体代码:
```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:这边的问题是选择了Graph模式却使用了PyNative的写法,所以导致报错,MindSpore支持两种运行模式,在调试或者运行方面做了不同的优化:
- PyNative模式:也称动态图模式,将神经网络中的各个算子逐一下发执行,方便用户编写和调试神经网络模型。
- Graph模式:也称静态图模式或者图模式,将神经网络模型编译成一整张图,然后下发执行。该模式利用图优化等技术提高运行性能,同时有助于规模部署和跨平台运行。
用户可以参考[官网教程](https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/debugging_in_pynative_mode.html)选择合适、统一的模式和写法来完成训练。
## 编程语言拓展
Q:最近出来的taichi编程语言有Python扩展,类似`import taichi as ti`就能直接用了,MindSpore是否也支持?
A:MindSpore支持Python原生表达,`import mindspore`相关包即可使用。
<br/>
Q:MindSpore是否(计划)支持多语言扩展?
A:MindSpore目前支持Python扩展,针对C++、Rust、Julia等语言的支持正在开发中。
## 特性支持
Q:MindSpore有轻量的端侧推理引擎么?
A:MindSpore有自己的端侧推理引擎,当前版本中已开源了端侧推理的部分功能。预计8月底会有更新,届时MindSpore端侧推理引擎在易用性,性能,算子完备度,以及第三方模型支持方面会更加完善和强大。
<br/>
Q:MindSpore在语义协同和处理上是如何实现的?是否利用当前学术界流行的FCA理论?
A:MindSpore框架本身并不需要支持FCA。对于语义类模型,用户可以调用第三方的工具在数据预处理阶段做FCA数学分析。MindSpore本身支持Python语言,`import FCA`相关包即可使用。
<br/>
Q:当前在云上MindSpore的训练和推理功能是比较完备的,至于边端场景(尤其是终端设备)MindSpore有什么计划?
A:MindSpore是端边云统一的训练和推理框架,支持将云侧训练的模型导出到Ascend AI处理器和终端设备进行推理。当前推理阶段支持的优化包括量化、算子融合、内存复用等。
<br/>
Q:MindSpore自动并行支持情况如何?
A:自动并行特性对CPU GPU的支持还在完善中。推荐用户在Ascend 910 AI处理器上使用自动并行,可以关注开源社区,申请MindSpore开发者体验环境进行试用。
<br/>
Q:MindSpore有没有类似基于TensorFlow实现的对象检测算法的模块?
A:TensorFlow的对象检测Pipeline接口属于TensorFlow Model模块。待MindSpore检测类模型完备后,会提供类似的Pipeline接口。
<br/>
Q:其他框架的脚本或者模型怎么迁移到MindSpore?
A:关于脚本或者模型迁移,可以查询MindSpore官网中关于[网络迁移](https://www.mindspore.cn/tutorial/zh-CN/master/advanced_use/network_migration.html)的介绍。
<br/>
Q:MindSpore是否附带开源电商类数据集?
A:暂时还没有,可以持续关注[MindSpore官网](https://www.mindspore.cn)
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册