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
c8a9e4e5
You need to sign in or sign up before continuing.
Commit
c8a9e4e5
authored
Apr 04, 2018
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get_collection in TowerTensorHandle
parent
2f9e2c0e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
README.md
README.md
+0
-2
tensorpack/callbacks/saver.py
tensorpack/callbacks/saver.py
+3
-3
tensorpack/tfutils/tower.py
tensorpack/tfutils/tower.py
+9
-0
No files found.
README.md
View file @
c8a9e4e5
...
@@ -36,7 +36,6 @@ We refuse toy examples.
...
@@ -36,7 +36,6 @@ We refuse toy examples.
Instead of showing you 10 arbitrary networks trained on toy datasets,
Instead of showing you 10 arbitrary networks trained on toy datasets,
[
tensorpack examples
](
examples
)
faithfully replicate papers and care about reproducing numbers,
[
tensorpack examples
](
examples
)
faithfully replicate papers and care about reproducing numbers,
demonstrating its flexibility for actual research.
demonstrating its flexibility for actual research.
Some highlights:
### Vision:
### Vision:
+
[
Train ResNet
](
examples/ResNet
)
and
[
other models
](
examples/ImageNetModels
)
on ImageNet.
+
[
Train ResNet
](
examples/ResNet
)
and
[
other models
](
examples/ImageNetModels
)
on ImageNet.
...
@@ -57,7 +56,6 @@ Some highlights:
...
@@ -57,7 +56,6 @@ Some highlights:
+
[
char-rnn for fun
](
examples/Char-RNN
)
+
[
char-rnn for fun
](
examples/Char-RNN
)
+
[
LSTM language model on PennTreebank
](
examples/PennTreebank
)
+
[
LSTM language model on PennTreebank
](
examples/PennTreebank
)
## Install:
## Install:
Dependencies:
Dependencies:
...
...
tensorpack/callbacks/saver.py
View file @
c8a9e4e5
...
@@ -98,6 +98,7 @@ class MinSaver(Callback):
...
@@ -98,6 +98,7 @@ class MinSaver(Callback):
reverse (bool): if True, will save the maximum.
reverse (bool): if True, will save the maximum.
filename (str): the name for the saved model.
filename (str): the name for the saved model.
Defaults to ``min-{monitor_stat}.tfmodel``.
Defaults to ``min-{monitor_stat}.tfmodel``.
checkpoint_dir (str): the directory containing checkpoints.
Example:
Example:
Save the model with minimum validation error to
Save the model with minimum validation error to
...
@@ -108,9 +109,8 @@ class MinSaver(Callback):
...
@@ -108,9 +109,8 @@ class MinSaver(Callback):
MinSaver('val-error')
MinSaver('val-error')
Notes:
Notes:
It assumes that :class:`ModelSaver` is used with
It assumes that :class:`ModelSaver` is used with the same ``checkpoint_dir``
the same ``checkpoint_dir``. And it will save
and appears earlier in the callback list.
the model to that directory as well.
The default for both :class:`ModelSaver` and :class:`MinSaver`
The default for both :class:`ModelSaver` and :class:`MinSaver`
is ``checkpoint_dir=logger.get_logger_dir()``
is ``checkpoint_dir=logger.get_logger_dir()``
"""
"""
...
...
tensorpack/tfutils/tower.py
View file @
c8a9e4e5
...
@@ -333,6 +333,15 @@ class TowerTensorHandle(object):
...
@@ -333,6 +333,15 @@ class TowerTensorHandle(object):
name_with_vs
=
name
name_with_vs
=
name
return
get_op_or_tensor_by_name
(
name_with_vs
)
return
get_op_or_tensor_by_name
(
name_with_vs
)
def
get_collection
(
self
,
name
):
"""
Get items from a collection that are added in this tower.
Args:
name (str): the name of the collection
"""
return
self
.
_ctx
.
get_collection_in_tower
(
name
)
@
property
@
property
def
input
(
self
):
def
input
(
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