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
25fa822f
Commit
25fa822f
authored
1 year ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
fdf72240
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/deeplearning/icing_fcn.py
+2
-23
2 additions, 23 deletions
modules/deeplearning/icing_fcn.py
with
2 additions
and
23 deletions
modules/deeplearning/icing_fcn.py
+
2
−
23
View file @
25fa822f
...
...
@@ -2,7 +2,7 @@ import tensorflow as tf
from
util.setup
import
logdir
,
modeldir
,
cachepath
,
now
,
ancillary_path
,
home_dir
from
util.util
import
EarlyStop
,
normalize
from
util.geos_nav
import
get_navigation
from
util.augment
import
augment_i
mage_3ar
g
from
util.augment
import
augment_i
cin
g
import
os
,
datetime
import
numpy
as
np
...
...
@@ -323,27 +323,6 @@ class IcingIntensityFCN:
label
=
np
.
where
(
np
.
invert
(
np
.
logical_or
(
label
==
0
,
label
==
1
)),
2
,
label
)
label
=
label
.
reshape
((
label
.
shape
[
0
],
1
))
# if is_training and DO_AUGMENT:
# data_ud = np.flip(data, axis=1)
# data_alt_ud = np.copy(data_alt)
# label_ud = np.copy(label)
#
# data_lr = np.flip(data, axis=2)
# data_alt_lr = np.copy(data_alt)
# label_lr = np.copy(label)
#
# data_r1 = np.rot90(data, k=1, axes=(1, 2))
# data_alt_r1 = np.copy(data_alt)
# label_r1 = np.copy(label)
#
# data_r2 = np.rot90(data, k=1, axes=(1, 2))
# data_alt_r2 = np.copy(data_alt)
# label_r2 = np.copy(label)
#
# data = np.concatenate([data, data_ud, data_lr, data_r1, data_r2])
# data_alt = np.concatenate([data_alt, data_alt_ud, data_alt_lr, data_alt_r1, data_alt_r2])
# label = np.concatenate([label, label_ud, label_lr, label_r1, label_r2])
return
data
,
data_alt
,
label
def
get_parameter_data
(
self
,
param
,
nd_idxs
,
is_training
):
...
...
@@ -469,7 +448,7 @@ class IcingIntensityFCN:
dataset
=
dataset
.
cache
()
dataset
=
dataset
.
shuffle
(
PROC_BATCH_BUFFER_SIZE
,
reshuffle_each_iteration
=
True
)
if
DO_AUGMENT
:
dataset
=
dataset
.
map
(
augment_i
mage_3ar
g
(),
num_parallel_calls
=
8
)
dataset
=
dataset
.
map
(
augment_i
cin
g
(),
num_parallel_calls
=
8
)
dataset
=
dataset
.
prefetch
(
buffer_size
=
1
)
self
.
train_dataset
=
dataset
...
...
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