Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
LBN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
1
Merge Requests
1
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
3pia
LBN
Commits
8b179f4f
Commit
8b179f4f
authored
Apr 13, 2019
by
Marcel Rieger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add keras LBNLayer.
parent
17bbb86d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
1 deletion
+24
-1
lbn.py
lbn.py
+24
-1
No files found.
lbn.py
View file @
8b179f4f
...
...
@@ -13,7 +13,7 @@ __contact__ = "https://git.rwth-aachen.de/3pia/lbn"
__email__
=
"marcel.rieger@cern.ch"
__version__
=
"1.0.3"
__all__
=
[
"LBN"
,
"FeatureFactoryBase"
,
"FeatureFactory"
]
__all__
=
[
"LBN"
,
"
LBNLayer"
,
"
FeatureFactoryBase"
,
"FeatureFactory"
]
import
os
...
...
@@ -522,6 +522,29 @@ class LBN(object):
self
.
_norm_features
=
self
.
batch_norm
(
self
.
features
,
training
=
self
.
is_training
)
class
LBNLayer
(
tf
.
keras
.
layers
.
Layer
):
"""
Keras layer of the :py:class:`LBN` that forwards the standard interface of :py:meth:`__init__`
and py:meth:`__call__`.
.. py:attribute:: lbn
type: LBN
Reference to the internal :py:class:`LBN` instance that is initialized with the contructor
arguments of this class.
"""
def
__init__
(
self
,
*
args
,
**
kwargs
):
super
(
LBNLayer
,
self
).
__init__
()
# create the LBN instalce
self
.
lbn
=
LBN
(
*
args
,
**
kwargs
)
def
__call__
(
self
,
*
args
,
**
kwargs
):
# forward to lbn.__call__
return
self
.
lbn
(
*
args
,
**
kwargs
)
class
FeatureFactoryBase
(
object
):
"""
Base class of the feature factory. It does not implement actual features but rather the
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment