Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
221cb0332
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2022
221cb0332
Commits
a2db0506
Commit
a2db0506
authored
3 years ago
by
dinglinhe
Browse files
Options
Downloads
Patches
Plain Diff
Update mindspore_hub_conf in vgg16 at branch master
parent
73400843
No related branches found
No related tags found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
official/cv/vgg16/mindspore_hub_conf.py
+9
-2
9 additions, 2 deletions
official/cv/vgg16/mindspore_hub_conf.py
with
9 additions
and
2 deletions
official/cv/vgg16/mindspore_hub_conf.py
+
9
−
2
View file @
a2db0506
...
...
@@ -14,7 +14,7 @@
# ============================================================================
"""
hub config.
"""
from
src.vgg
import
vgg16
as
VGG16
from
model_utils.
moxing_adapter
import
config
from
model_utils.
config
import
get_
config
_static
def
vgg16
(
*
args
,
**
kwargs
):
return
VGG16
(
*
args
,
**
kwargs
)
...
...
@@ -22,5 +22,12 @@ def vgg16(*args, **kwargs):
def
create_network
(
name
,
*
args
,
**
kwargs
):
if
name
==
"
vgg16
"
:
return
vgg16
(
args
=
config
,
*
args
,
**
kwargs
)
num_classes
=
kwargs
.
get
(
"
num_classes
"
,
10
)
if
"
num_classes
"
in
kwargs
:
del
kwargs
[
"
num_classes
"
]
if
num_classes
==
10
:
config
=
get_config_static
(
config_path
=
"
../cifar10_config.yaml
"
)
elif
num_classes
==
1000
:
config
=
get_config_static
(
config_path
=
"
../imagenet2012_config.yaml
"
)
return
vgg16
(
num_classes
=
num_classes
,
args
=
config
,
*
args
,
**
kwargs
)
raise
NotImplementedError
(
f
"
{
name
}
is not implemented in the repo
"
)
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment