Skip to content

Upgrade MindSpore version to v1.2.0 and make some adaptation #81

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 21, 2021

Conversation

leonwanghui
Copy link
Contributor

What type of PR is this?

/kind enhancement

What does this PR do / why do we need it:

This PR is proposed to upgrade the dependency of MindSpore to v1.2.0, after that some required modification have been done to make the CI passed.

Besides, this PR has added a new interface load in model module to support load MindIR graph directly to perform model inference operation.

>>> import tinyms as ts
>>> import tinyms.layers as layers
>>> from tinyms.model import Model, load
>>>
>>> net = layers.Conv2d(1, 1, kernel_size=3)
>>> model = Model(net)
>>> input = ts.ones([1, 1, 3, 3])
>>> model.export(input, "net", file_format="MINDIR")
...
>>> net = load("net.mindir")
>>> print(net(input))
[[[[ 0.02548009  0.04010789  0.03120251]
    [ 0.00268656  0.02353744  0.03807815]
    [-0.00896441 -0.00303641  0.01502199]]]]

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewers:

@leonwanghui leonwanghui self-assigned this Apr 19, 2021
@leonwanghui leonwanghui force-pushed the 1.2-upgrade branch 2 times, most recently from 8028591 to 8c82893 Compare April 20, 2021 07:42
Copy link
Collaborator

@hannibalhuang hannibalhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small nix

Signed-off-by: leonwanghui <wanghui71leon@gmail.com>
@leonwanghui leonwanghui added the enhancement New feature or request label Apr 20, 2021
Copy link
Collaborator

@hannibalhuang hannibalhuang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@huxiaoman7
Copy link
Collaborator

lgtm

@leonwanghui leonwanghui merged commit 093ea18 into tinyms-ai:main Apr 21, 2021
@leonwanghui leonwanghui deleted the 1.2-upgrade branch April 21, 2021 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants