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
8b879cb9
Commit
8b879cb9
authored
Jul 10, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bugfix in InputDesc initialization
parent
a266459e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
tensorpack/models/model_desc.py
tensorpack/models/model_desc.py
+3
-2
No files found.
tensorpack/models/model_desc.py
View file @
8b879cb9
...
...
@@ -24,7 +24,7 @@ class InputDesc(
_cached_placeholder
=
None
def
__
init__
(
self
,
type
,
shape
,
name
):
def
__
new__
(
cls
,
type
,
shape
,
name
):
"""
Args:
type (tf.DType):
...
...
@@ -32,7 +32,8 @@ class InputDesc(
name (str):
"""
shape
=
tuple
(
shape
)
# has to be tuple for self to be hashable
super
(
InputDesc
,
self
)
.
__init__
(
type
,
shape
,
name
)
self
=
super
(
InputDesc
,
cls
)
.
__new__
(
cls
,
type
,
shape
,
name
)
return
self
# TODO in serialization, skip _cached_placeholder
# def dumps(self):
...
...
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