Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
Lightweight super-resolution using knowledge distillation
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
영제 임
Lightweight super-resolution using knowledge distillation
Commits
075eeec1
Commit
075eeec1
authored
6 years ago
by
Sanghyun Son
Browse files
Options
Downloads
Patches
Plain Diff
fix reported errors
parent
70294bb6
Branches
Branches containing commit
No related tags found
1 merge request
!1
Jan 09, 2018 updates
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
README.md
+1
-0
1 addition, 0 deletions
README.md
src/data/srdata.py
+4
-1
4 additions, 1 deletion
src/data/srdata.py
src/main.py
+1
-1
1 addition, 1 deletion
src/main.py
src/option.py
+1
-1
1 addition, 1 deletion
src/option.py
src/utility.py
+1
-1
1 addition, 1 deletion
src/utility.py
with
8 additions
and
4 deletions
README.md
+
1
−
0
View file @
075eeec1
...
@@ -33,6 +33,7 @@ We provide scripts for reproducing all the results from our paper. You can train
...
@@ -33,6 +33,7 @@ We provide scripts for reproducing all the results from our paper. You can train
*
**imageio**
*
**imageio**
*
matplotlib
*
matplotlib
*
tqdm
*
tqdm
*
cv2 >= 3.xx (Only if you use video input/output)
**Recent updates**
**Recent updates**
...
...
This diff is collapsed.
Click to expand it.
src/data/srdata.py
+
4
−
1
View file @
075eeec1
...
@@ -77,6 +77,9 @@ class SRData(data.Dataset):
...
@@ -77,6 +77,9 @@ class SRData(data.Dataset):
if
train
:
if
train
:
n_patches
=
args
.
batch_size
*
args
.
test_every
n_patches
=
args
.
batch_size
*
args
.
test_every
n_images
=
len
(
args
.
data_train
)
*
len
(
self
.
images_hr
)
n_images
=
len
(
args
.
data_train
)
*
len
(
self
.
images_hr
)
if
n_images
==
0
:
self
.
repeat
=
0
else
:
self
.
repeat
=
max
(
n_patches
//
n_images
,
1
)
self
.
repeat
=
max
(
n_patches
//
n_images
,
1
)
# Below functions as used to prepare images
# Below functions as used to prepare images
...
...
This diff is collapsed.
Click to expand it.
src/main.py
+
1
−
1
View file @
075eeec1
...
@@ -6,12 +6,12 @@ import model
...
@@ -6,12 +6,12 @@ import model
import
loss
import
loss
from
option
import
args
from
option
import
args
from
trainer
import
Trainer
from
trainer
import
Trainer
from
videotester
import
VideoTester
torch
.
manual_seed
(
args
.
seed
)
torch
.
manual_seed
(
args
.
seed
)
checkpoint
=
utility
.
checkpoint
(
args
)
checkpoint
=
utility
.
checkpoint
(
args
)
if
args
.
data_test
==
'
video
'
:
if
args
.
data_test
==
'
video
'
:
from
videotester
import
VideoTester
model
=
model
.
Model
(
args
,
checkpoint
)
model
=
model
.
Model
(
args
,
checkpoint
)
t
=
VideoTester
(
args
,
model
,
checkpoint
)
t
=
VideoTester
(
args
,
model
,
checkpoint
)
t
.
test
()
t
.
test
()
...
...
This diff is collapsed.
Click to expand it.
src/option.py
+
1
−
1
View file @
075eeec1
...
@@ -114,7 +114,7 @@ parser.add_argument('--optimizer', default='ADAM',
...
@@ -114,7 +114,7 @@ parser.add_argument('--optimizer', default='ADAM',
help
=
'
optimizer to use (SGD | ADAM | RMSprop)
'
)
help
=
'
optimizer to use (SGD | ADAM | RMSprop)
'
)
parser
.
add_argument
(
'
--momentum
'
,
type
=
float
,
default
=
0.9
,
parser
.
add_argument
(
'
--momentum
'
,
type
=
float
,
default
=
0.9
,
help
=
'
SGD momentum
'
)
help
=
'
SGD momentum
'
)
parser
.
add_argument
(
'
--beta
'
,
type
=
tuple
,
default
=
(
0.9
,
0.999
),
parser
.
add_argument
(
'
--beta
s
'
,
type
=
tuple
,
default
=
(
0.9
,
0.999
),
help
=
'
ADAM beta
'
)
help
=
'
ADAM beta
'
)
parser
.
add_argument
(
'
--epsilon
'
,
type
=
float
,
default
=
1e-8
,
parser
.
add_argument
(
'
--epsilon
'
,
type
=
float
,
default
=
1e-8
,
help
=
'
ADAM epsilon for numerical stability
'
)
help
=
'
ADAM epsilon for numerical stability
'
)
...
...
This diff is collapsed.
Click to expand it.
src/utility.py
+
1
−
1
View file @
075eeec1
...
@@ -192,7 +192,7 @@ def make_optimizer(args, my_model):
...
@@ -192,7 +192,7 @@ def make_optimizer(args, my_model):
elif
args
.
optimizer
==
'
ADAM
'
:
elif
args
.
optimizer
==
'
ADAM
'
:
optimizer_function
=
optim
.
Adam
optimizer_function
=
optim
.
Adam
kwargs
=
{
kwargs
=
{
'
betas
'
:
args
.
beta
,
'
betas
'
:
args
.
beta
s
,
'
eps
'
:
args
.
epsilon
'
eps
'
:
args
.
epsilon
}
}
elif
args
.
optimizer
==
'
RMSprop
'
:
elif
args
.
optimizer
==
'
RMSprop
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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