Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
21e9b5c5
"README.md" did not exist on "18d05f9c3dd47ebbaf36fcb1755a85ee2645539c"
Commit
21e9b5c5
authored
2 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
69af6d1e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/deeplearning/espcn_l1b_l2.py
+6
-2
6 additions, 2 deletions
modules/deeplearning/espcn_l1b_l2.py
with
6 additions
and
2 deletions
modules/deeplearning/espcn_l1b_l2.py
+
6
−
2
View file @
21e9b5c5
...
...
@@ -310,10 +310,12 @@ class ESPCN:
dataset
=
dataset
.
map
(
self
.
data_function_evaluate
,
num_parallel_calls
=
8
)
self
.
eval_dataset
=
dataset
def
setup_pipeline
(
self
,
train_data_files
,
t
est_data
_files
,
num_train_samples
):
def
setup_pipeline
(
self
,
train_data_files
,
t
rain_label_files
,
test_data_files
,
test_label
_files
,
num_train_samples
):
self
.
train_data_files
=
train_data_files
self
.
test_data_files
=
test_data_files
self
.
train_label_files
=
train_label_files
self
.
test_label_files
=
test_label_files
trn_idxs
=
np
.
arange
(
len
(
train_data_files
))
np
.
random
.
shuffle
(
trn_idxs
)
...
...
@@ -633,11 +635,13 @@ class ESPCN:
def
run
(
self
,
directory
):
train_data_files
=
glob
.
glob
(
directory
+
'
data_train*.npy
'
)
valid_data_files
=
glob
.
glob
(
directory
+
'
data_valid*.npy
'
)
train_label_files
=
glob
.
glob
(
directory
+
'
label_train*.npy
'
)
valid_label_files
=
glob
.
glob
(
directory
+
'
label_valid*.npy
'
)
train_data_files
.
sort
()
valid_data_files
.
sort
()
self
.
setup_pipeline
(
train_data_files
,
valid_data
_files
,
100000
)
self
.
setup_pipeline
(
train_data_files
,
train_label_files
,
valid_data_files
,
valid_label
_files
,
100000
)
self
.
build_model
()
self
.
build_training
()
self
.
build_evaluation
()
...
...
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