Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seminar-breakout
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Shashank Suhas
seminar-breakout
Commits
9f056711
Commit
9f056711
authored
May 03, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strict LinearWrap
parent
c24697ee
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
tensorpack/models/linearwrap.py
tensorpack/models/linearwrap.py
+5
-7
No files found.
tensorpack/models/linearwrap.py
View file @
9f056711
...
...
@@ -5,7 +5,6 @@
import
six
from
types
import
ModuleType
from
..utils
import
logger
from
.common
import
get_registered_layer
__all__
=
[
'LinearWrap'
]
...
...
@@ -58,12 +57,11 @@ class LinearWrap(object):
return
LinearWrap
(
ret
)
return
f
else
:
if
layer_name
!=
'tf'
:
logger
.
warn
(
"You're calling LinearWrap.__getattr__ with {}:"
" neither a layer nor 'tf'!"
.
format
(
layer_name
))
import
tensorflow
as
tf
# noqa
layer
=
eval
(
layer_name
)
assert
layer_name
==
'tf'
,
\
"Calling LinearWrap.{}:"
\
" neither a layer nor 'tf'! "
\
"Did you forget to extract tensor from LinearWrap?"
.
format
(
layer_name
)
import
tensorflow
as
layer
# noqa
assert
isinstance
(
layer
,
ModuleType
),
layer
return
LinearWrap
.
_TFModuleFunc
(
layer
,
self
.
_t
)
...
...
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