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
9fd9f1ed
Commit
9fd9f1ed
authored
Nov 01, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix missing `restore_collection` in tower. (fix #462)
parent
a812979a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
tensorpack/graph_builder/predict.py
tensorpack/graph_builder/predict.py
+1
-1
tensorpack/input_source/input_source.py
tensorpack/input_source/input_source.py
+2
-1
tensorpack/tfutils/collection.py
tensorpack/tfutils/collection.py
+1
-0
No files found.
tensorpack/graph_builder/predict.py
View file @
9fd9f1ed
#!/usr/bin/env python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
# File: predict
or_factory
.py
# File: predict.py
import
tensorflow
as
tf
import
tensorflow
as
tf
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
...
...
tensorpack/input_source/input_source.py
View file @
9fd9f1ed
...
@@ -87,7 +87,8 @@ class FeedInput(InputSource):
...
@@ -87,7 +87,8 @@ class FeedInput(InputSource):
return
self
.
ds
.
size
()
return
self
.
ds
.
size
()
def
_setup
(
self
,
inputs
):
def
_setup
(
self
,
inputs
):
self
.
_all_placehdrs
=
[
v
.
build_placeholder
(
prefix
=
''
)
for
v
in
inputs
]
# placeholders as input are always safe to reuse.
self
.
_all_placehdrs
=
[
v
.
build_placeholder_reuse
()
for
v
in
inputs
]
self
.
_cb
=
self
.
_FeedCallback
(
self
.
_iter_ds
,
self
.
_all_placehdrs
)
self
.
_cb
=
self
.
_FeedCallback
(
self
.
_iter_ds
,
self
.
_all_placehdrs
)
def
_get_input_tensors
(
self
):
def
_get_input_tensors
(
self
):
...
...
tensorpack/tfutils/collection.py
View file @
9fd9f1ed
...
@@ -150,6 +150,7 @@ class CollectionGuard(object):
...
@@ -150,6 +150,7 @@ class CollectionGuard(object):
self
.
_name
,
', '
.
join
(
self
.
_name
,
', '
.
join
(
map
(
lambda
t
:
"({}: {}->{})"
.
format
(
*
t
),
map
(
lambda
t
:
"({}: {}->{})"
.
format
(
*
t
),
size_change
))))
size_change
))))
restore_collection
(
self
.
_freeze_backup
)
def
get_collection_in_tower
(
self
,
key
):
def
get_collection_in_tower
(
self
,
key
):
"""
"""
...
...
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