Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ModelZoo
HAT_pytorch
Commits
f715b2c2
Commit
f715b2c2
authored
Feb 05, 2024
by
Rayyyyy
Browse files
modify gmodx, update README
parent
42d70a9f
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
39 additions
and
41 deletions
+39
-41
options/train/train_HAT-S_SRx3_from_scratch.yml
options/train/train_HAT-S_SRx3_from_scratch.yml
+9
-9
options/train/train_HAT-S_SRx4_finetune_from_SRx2.yml
options/train/train_HAT-S_SRx4_finetune_from_SRx2.yml
+9
-9
options/train/train_HAT_SRx2_ImageNet_from_scratch.yml
options/train/train_HAT_SRx2_ImageNet_from_scratch.yml
+2
-2
options/train/train_HAT_SRx2_finetune_from_ImageNet_pretrain.yml
.../train/train_HAT_SRx2_finetune_from_ImageNet_pretrain.yml
+2
-2
options/train/train_HAT_SRx2_from_scratch.yml
options/train/train_HAT_SRx2_from_scratch.yml
+2
-2
options/train/train_HAT_SRx3_ImageNet_from_scratch.yml
options/train/train_HAT_SRx3_ImageNet_from_scratch.yml
+2
-2
options/train/train_HAT_SRx3_finetune_from_ImageNet_pretrain.yml
.../train/train_HAT_SRx3_finetune_from_ImageNet_pretrain.yml
+2
-2
options/train/train_HAT_SRx3_from_scratch.yml
options/train/train_HAT_SRx3_from_scratch.yml
+2
-2
options/train/train_HAT_SRx4_ImageNet_from_scratch.yml
options/train/train_HAT_SRx4_ImageNet_from_scratch.yml
+2
-2
options/train/train_HAT_SRx4_finetune_from_ImageNet_pretrain.yml
.../train/train_HAT_SRx4_finetune_from_ImageNet_pretrain.yml
+2
-2
options/train/train_HAT_SRx4_finetune_from_SRx2.yml
options/train/train_HAT_SRx4_finetune_from_SRx2.yml
+2
-2
run_train_multi.sh
run_train_multi.sh
+3
-5
No files found.
options/train/train_HAT-S_SRx3_from_scratch.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
datasets/Set5/GTmod
3
dataroot_gt
:
datasets/Set5/GTmod
12
dataroot_lq
:
datasets/Set5/LRbicx3
io_backend
:
type
:
disk
...
...
@@ -38,18 +38,18 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
datasets/Set14/GTmod
3
dataroot_gt
:
datasets/Set14/GTmod
12
dataroot_lq
:
datasets/Set14/LRbicx3
io_backend
:
type
:
disk
val_3
:
name
:
Urban100
type
:
PairedImageDataset
dataroot_gt
:
datasets/urban100/GTmod3
dataroot_lq
:
datasets/urban100/LRbicx3
io_backend
:
type
:
disk
#
val_3:
#
name: Urban100
#
type: PairedImageDataset
#
dataroot_gt: datasets/urban100/GTmod3
#
dataroot_lq: datasets/urban100/LRbicx3
#
io_backend:
#
type: disk
# network structures
...
...
options/train/train_HAT-S_SRx4_finetune_from_SRx2.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
datasets/Set5/GTmod
4
dataroot_gt
:
datasets/Set5/GTmod
12
dataroot_lq
:
datasets/Set5/LRbicx4
io_backend
:
type
:
disk
...
...
@@ -38,18 +38,18 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
datasets/Set14/GTmod
4
dataroot_gt
:
datasets/Set14/GTmod
12
dataroot_lq
:
datasets/Set14/LRbicx4
io_backend
:
type
:
disk
val_3
:
name
:
Urban100
type
:
PairedImageDataset
dataroot_gt
:
datasets/urban100/GTmod4
dataroot_lq
:
datasets/urban100/LRbicx4
io_backend
:
type
:
disk
#
val_3:
#
name: Urban100
#
type: PairedImageDataset
#
dataroot_gt: datasets/urban100/GTmod4
#
dataroot_lq: datasets/urban100/LRbicx4
#
io_backend:
#
type: disk
# network structures
...
...
options/train/train_HAT_SRx2_ImageNet_from_scratch.yml
View file @
f715b2c2
...
...
@@ -29,7 +29,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod2
dataroot_gt
:
./datasets/Set5/GTmod
1
2
dataroot_lq
:
./datasets/Set5/LRbicx2
io_backend
:
type
:
disk
...
...
@@ -37,7 +37,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod2
dataroot_gt
:
./datasets/Set14/GTmod
1
2
dataroot_lq
:
./datasets/Set14/LRbicx2
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx2_finetune_from_ImageNet_pretrain.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod2
dataroot_gt
:
./datasets/Set5/GTmod
1
2
dataroot_lq
:
./datasets/Set5/LRbicx2
io_backend
:
type
:
disk
...
...
@@ -38,7 +38,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod2
dataroot_gt
:
./datasets/Set14/GTmod
1
2
dataroot_lq
:
./datasets/Set14/LRbicx2
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx2_from_scratch.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod2
dataroot_gt
:
./datasets/Set5/GTmod
1
2
dataroot_lq
:
./datasets/Set5/LRbicx2
io_backend
:
type
:
disk
...
...
@@ -38,7 +38,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod2
dataroot_gt
:
./datasets/Set14/GTmod
1
2
dataroot_lq
:
./datasets/Set14/LRbicx2
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx3_ImageNet_from_scratch.yml
View file @
f715b2c2
...
...
@@ -29,7 +29,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod
3
dataroot_gt
:
./datasets/Set5/GTmod
12
dataroot_lq
:
./datasets/Set5/LRbicx3
io_backend
:
type
:
disk
...
...
@@ -37,7 +37,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod
3
dataroot_gt
:
./datasets/Set14/GTmod
12
dataroot_lq
:
./datasets/Set14/LRbicx3
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx3_finetune_from_ImageNet_pretrain.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod
3
dataroot_gt
:
./datasets/Set5/GTmod
12
dataroot_lq
:
./datasets/Set5/LRbicx3
io_backend
:
type
:
disk
...
...
@@ -38,7 +38,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod
3
dataroot_gt
:
./datasets/Set14/GTmod
12
dataroot_lq
:
./datasets/Set14/LRbicx3
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx3_from_scratch.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod
3
dataroot_gt
:
./datasets/Set5/GTmod
12
dataroot_lq
:
./datasets/Set5/LRbicx3
io_backend
:
type
:
disk
...
...
@@ -38,7 +38,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod
3
dataroot_gt
:
./datasets/Set14/GTmod
12
dataroot_lq
:
./datasets/Set14/LRbicx3
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx4_ImageNet_from_scratch.yml
View file @
f715b2c2
...
...
@@ -29,7 +29,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod
4
dataroot_gt
:
./datasets/Set5/GTmod
12
dataroot_lq
:
./datasets/Set5/LRbicx4
io_backend
:
type
:
disk
...
...
@@ -37,7 +37,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod
4
dataroot_gt
:
./datasets/Set14/GTmod
12
dataroot_lq
:
./datasets/Set14/LRbicx4
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx4_finetune_from_ImageNet_pretrain.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod
4
dataroot_gt
:
./datasets/Set5/GTmod
12
dataroot_lq
:
./datasets/Set5/LRbicx4
io_backend
:
type
:
disk
...
...
@@ -38,7 +38,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod
4
dataroot_gt
:
./datasets/Set14/GTmod
12
dataroot_lq
:
./datasets/Set14/LRbicx4
io_backend
:
type
:
disk
...
...
options/train/train_HAT_SRx4_finetune_from_SRx2.yml
View file @
f715b2c2
...
...
@@ -30,7 +30,7 @@ datasets:
val_1
:
name
:
Set5
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set5/GTmod
4
dataroot_gt
:
./datasets/Set5/GTmod
12
dataroot_lq
:
./datasets/Set5/LRbicx4
io_backend
:
type
:
disk
...
...
@@ -38,7 +38,7 @@ datasets:
val_2
:
name
:
Set14
type
:
PairedImageDataset
dataroot_gt
:
./datasets/Set14/GTmod
4
dataroot_gt
:
./datasets/Set14/GTmod
12
dataroot_lq
:
./datasets/Set14/LRbicx4
io_backend
:
type
:
disk
...
...
run.sh
→
run
_train_multi
.sh
View file @
f715b2c2
...
...
@@ -3,21 +3,19 @@ echo "START TIME: $(date)"
hostfile
=
./hostfile
np
=
$(
cat
$hostfile
|sort|uniq |wc
-l
)
np
=
$((
$np
*
8
))
np
=
$((
$np
*
4
))
echo
$np
nodename
=
$(
cat
$hostfile
|sed
-n
"1p"
)
dist_url
=
`
echo
$nodename
|
awk
'{print $1}'
`
export
dist_url
=
`
echo
$nodename
|
awk
'{print $1}'
`
which mpirun
# 添加pythonlib环境, 用户需修改为自己的环境变量地址
export
LD_LIBRARY_PATH
=
${
LD_LIBRARY_PATH
}
:/path/of/conda/envs/
{
env_name
}
/lib
export
PYTHON
=
python3
export
NPROC_PER_NODE
=
4
# 使用mpirun 进行多卡训练,分别对单张卡进行单线程启动
# -np 显卡数量
# -x 将变量传递到single_process.sh脚本中
mpirun
-np
$np
--allow-run-as-root
--hostfile
hostfile
--bind-to
none
-x
dist_url
-x
PYTHON
-x
NPROC_PER_NODE
`
pwd
`
/single_process.sh
mpirun
-np
$np
--allow-run-as-root
--hostfile
hostfile
--bind-to
none
-x
dist_url
-x
PYTHON
`
pwd
`
/single_process.sh
echo
"END TIME:
$(
date
)
"
Prev
1
2
Next
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment