Huawei Technologies Co. Ltd. recently open-sourced ‘Mindspore‘, a framework for artificial intelligence-based application development. This lightweight framework is ready to give competition to Google’s TensorFlow, and Facebook’s PyTorch, and it can scale across devices, cloud, and edge environments.
One of the key competitive advantages with ‘Mindspore’ is that it uses 20% fewer codes that its competitors for a function like NLP (Natural language processing). Apart from codes, it can also support parallel training to save training time across hardware. Huawei developed this framework with support from partners like the University of Edinburgh, Peking University, Imperial College London, and robotics startup Milvus.
Mindspore maintains and preserves sensitive data by not processing any data itself but ingests only the gradient and model information that has already been processed. It does maintain the robustness of the model while preserving the sensitive data.
For installation using
Ubuntu-x86 build version as an example:
Download whl from MindSpore download page, and install the package.
pip install https://ms-release.obs.cn-north-4.myhuaweicloud.com/0.2.0-alpha/MindSpore/cpu/x86_ubuntu/mindspore-0.2.0-cp37-cp37m-linux_x86_64.whl
Run the following command to verify the install.
import numpy as np import mindspore.context as context import mindspore.nn as nn from mindspore import Tensor from mindspore.ops import operations as P context.set_context(mode=context.GRAPH_MODE, device_target="CPU") class Mul(nn.Cell): def __init__(self): super(Mul, self).__init__() self.mul = P.Mul() def construct(self, x, y): return self.mul(x, y) x = Tensor(np.array([1.0, 2.0, 3.0]).astype(np.float32)) y = Tensor(np.array([4.0, 5.0, 6.0]).astype(np.float32)) mul = Mul() print(mul(x, y))