Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KerasROOTClassification
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
Container Registry
Model registry
Operate
Environments
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
Nikolai.Hartmann
KerasROOTClassification
Commits
f92546b5
Commit
f92546b5
authored
6 years ago
by
Nikolai.Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
revert read_activations.py back to process all layers
parent
d94eca34
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
keras_visualize_activations/read_activations.py
+1
-6
1 addition, 6 deletions
keras_visualize_activations/read_activations.py
with
1 addition
and
6 deletions
keras_visualize_activations/read_activations.py
+
1
−
6
View file @
f92546b5
import
keras.backend
as
K
import
keras.backend
as
K
from
keras.layers
import
Masking
,
InputLayer
def
get_activations
(
model
,
model_inputs
,
print_shape_only
=
False
,
layer_name
=
None
):
def
get_activations
(
model
,
model_inputs
,
print_shape_only
=
False
,
layer_name
=
None
):
print
(
'
----- activations -----
'
)
print
(
'
----- activations -----
'
)
...
@@ -13,12 +12,8 @@ def get_activations(model, model_inputs, print_shape_only=False, layer_name=None
...
@@ -13,12 +12,8 @@ def get_activations(model, model_inputs, print_shape_only=False, layer_name=None
inp
=
[
inp
]
inp
=
[
inp
]
model_multi_inputs_cond
=
False
model_multi_inputs_cond
=
False
# all layer outputs
# skip input and masking layers
outputs
=
[
layer
.
output
for
layer
in
model
.
layers
if
outputs
=
[
layer
.
output
for
layer
in
model
.
layers
if
(
layer
.
name
==
layer_name
or
layer_name
is
None
)
layer
.
name
==
layer_name
or
layer_name
is
None
]
# all layer outputs
and
not
isinstance
(
layer
,
InputLayer
)
and
not
isinstance
(
layer
,
Masking
)]
funcs
=
[
K
.
function
(
inp
+
[
K
.
learning_phase
()],
[
out
])
for
out
in
outputs
]
# evaluation functions
funcs
=
[
K
.
function
(
inp
+
[
K
.
learning_phase
()],
[
out
])
for
out
in
outputs
]
# evaluation functions
...
...
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