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
26372c0e
Commit
26372c0e
authored
3 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
d380bb20
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/icing_cnn.py
+9
-4
9 additions, 4 deletions
modules/deeplearning/icing_cnn.py
with
9 additions
and
4 deletions
modules/deeplearning/icing_cnn.py
+
9
−
4
View file @
26372c0e
...
...
@@ -35,6 +35,7 @@ TRIPLET = False
CONV3D
=
False
NOISE_TRAINING
=
False
NOISE_STDDEV
=
0.01
img_width
=
16
...
...
@@ -244,10 +245,12 @@ class IcingIntensityNN:
data
=
[]
for
param
in
train_params
:
nda
=
self
.
get_parameter_data
(
param
,
nd_idxs
,
is_training
)
if
NOISE_TRAINING
and
is_training
:
nda
=
normalize
(
nda
,
param
,
mean_std_dct
,
add_noise
=
True
,
noise_scale
=
0.01
,
seed
=
42
)
else
:
nda
=
normalize
(
nda
,
param
,
mean_std_dct
)
# Manual Corruption Process. Better: see use of tf.keras.layers.GaussianNoise
# if NOISE_TRAINING and is_training:
# nda = normalize(nda, param, mean_std_dct, add_noise=True, noise_scale=0.01, seed=42)
# else:
# nda = normalize(nda, param, mean_std_dct)
nda
=
normalize
(
nda
,
param
,
mean_std_dct
)
if
DO_ZERO_OUT
and
is_training
:
try
:
zero_out_params
.
index
(
param
)
...
...
@@ -842,6 +845,8 @@ class IcingIntensityNN:
f
.
close
()
def
build_model
(
self
):
if
NOISE_TRAINING
:
self
.
inputs
[
0
]
=
tf
.
keras
.
layers
.
GaussianNoise
(
stddev
=
NOISE_STDDEV
)(
self
.
inputs
[
0
])
flat
=
self
.
build_cnn
()
# flat_1d = self.build_1d_cnn()
# flat = tf.keras.layers.concatenate([flat, flat_1d, flat_anc])
...
...
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