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
06b4de43
Commit
06b4de43
authored
2 years ago
by
yuxiaodianyu
Browse files
Options
Downloads
Patches
Plain Diff
modify network RCAN scripts and resnet readme
parent
8f737375
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
official/cv/resnet/README_CN.md
+7
-3
7 additions, 3 deletions
official/cv/resnet/README_CN.md
research/cv/RCAN/src/rcan_model.py
+6
-5
6 additions, 5 deletions
research/cv/RCAN/src/rcan_model.py
with
13 additions
and
8 deletions
official/cv/resnet/README_CN.md
+
7
−
3
View file @
06b4de43
...
...
@@ -453,16 +453,20 @@ bash run_parameter_server_train_gpu.sh [DATASET_PATH] [CONFIG_PATH] [PRETRAINED_
```
bash
# Ascend 分布式训练时推理示例:
cd
scripts/
bash run_distribute_train.sh
[
RANK_TABLE_FILE]
[
DATASET_PATH]
[
CONFIG_PATH]
[
RUN_EVAL]
(
optional
)
[
EVAL_DATASET_PATH]
(
optional
)
# Ascend 单机训练时推理示例:
bash run_standalone_train.sh
[
RANK_TABLE_FILE]
[
DATASET_PATH]
[
CONFIG_PATH]
[
RUN_EVAL]
(
optional
)
[
EVAL_DATASET_PATH]
(
optional
)
cd
scripts/
bash run_standalone_train.sh
[
DATASET_PATH]
[
CONFIG_PATH]
[
RUN_EVAL]
(
optional
)
[
EVAL_DATASET_PATH]
(
optional
)
# GPU 分布式训练时推理示例:
bash run_distribute_train_gpu.sh
[
CONFIG_PATH]
[
RUN_EVAL]
(
optional
)
[
EVAL_DATASET_PATH]
(
optional
)
cd
scripts/
bash run_distribute_train_gpu.sh
[
DATASET_PATH]
[
CONFIG_PATH]
[
RUN_EVAL]
(
optional
)
[
EVAL_DATASET_PATH]
(
optional
)
# GPU 单机训练时推理示例:
bash run_standalone_train_gpu.sh
[
CONFIG_PATH]
[
RUN_EVAL]
(
optional
)
[
EVAL_DATASET_PATH]
(
optional
)
cd
scripts/
bash run_standalone_train_gpu.sh
[
DATASET_PATH]
[
CONFIG_PATH]
[
RUN_EVAL]
(
optional
)
[
EVAL_DATASET_PATH]
(
optional
)
```
训练时推理需要在设置
`RUN_EVAL`
为True,与此同时还需要设置
`EVAL_DATASET_PATH`
。此外,当设置
`RUN_EVAL`
为True时还可为python脚本设置
`save_best_ckpt`
,
`eval_start_epoch`
,
`eval_interval`
等参数。
...
...
This diff is collapsed.
Click to expand it.
research/cv/RCAN/src/rcan_model.py
+
6
−
5
View file @
06b4de43
...
...
@@ -86,11 +86,12 @@ class Upsampler(nn.Cell):
"""
rcan
"""
super
(
Upsampler
,
self
).
__init__
()
m
=
[]
if
(
scale
&
(
scale
-
1
))
==
0
:
for
_
in
range
(
int
(
math
.
log
(
scale
,
2
))):
m
.
append
(
SmallUpSampler
(
conv
,
2
,
n_feats
,
has_bias
=
has_bias
))
elif
scale
==
3
:
m
.
append
(
SmallUpSampler
(
conv
,
3
,
n_feats
,
has_bias
=
has_bias
))
for
s
in
scale
:
if
(
s
&
(
s
-
1
))
==
0
:
for
_
in
range
(
int
(
math
.
log
(
s
,
2
))):
m
.
append
(
SmallUpSampler
(
conv
,
2
,
n_feats
,
has_bias
=
has_bias
))
elif
s
==
3
:
m
.
append
(
SmallUpSampler
(
conv
,
3
,
n_feats
,
has_bias
=
has_bias
))
self
.
net
=
nn
.
SequentialCell
(
m
)
def
construct
(
self
,
x
):
...
...
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