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
23e4f928
Commit
23e4f928
authored
Jul 30, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide some internal functions from import
parent
ceb004a1
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
20 additions
and
18 deletions
+20
-18
tensorpack/callbacks/inference.py
tensorpack/callbacks/inference.py
+1
-1
tensorpack/callbacks/param.py
tensorpack/callbacks/param.py
+1
-1
tensorpack/callbacks/stats.py
tensorpack/callbacks/stats.py
+1
-1
tensorpack/graph_builder/input_source.py
tensorpack/graph_builder/input_source.py
+1
-1
tensorpack/predict/concurrency.py
tensorpack/predict/concurrency.py
+2
-2
tensorpack/tfutils/common.py
tensorpack/tfutils/common.py
+4
-4
tensorpack/tfutils/model_utils.py
tensorpack/tfutils/model_utils.py
+2
-2
tensorpack/tfutils/scope_utils.py
tensorpack/tfutils/scope_utils.py
+1
-1
tensorpack/tfutils/summary.py
tensorpack/tfutils/summary.py
+2
-2
tensorpack/tfutils/symbolic_functions.py
tensorpack/tfutils/symbolic_functions.py
+2
-0
tensorpack/tfutils/varmanip.py
tensorpack/tfutils/varmanip.py
+1
-1
tensorpack/train/base.py
tensorpack/train/base.py
+2
-2
No files found.
tensorpack/callbacks/inference.py
View file @
23e4f928
...
@@ -8,7 +8,7 @@ import six
...
@@ -8,7 +8,7 @@ import six
from
six.moves
import
zip
from
six.moves
import
zip
from
..utils.stats
import
RatioCounter
,
BinaryStatistics
from
..utils.stats
import
RatioCounter
,
BinaryStatistics
from
..tfutils
import
get_op_tensor_name
from
..tfutils
.common
import
get_op_tensor_name
__all__
=
[
'ScalarStats'
,
'Inferencer'
,
__all__
=
[
'ScalarStats'
,
'Inferencer'
,
'ClassificationError'
,
'BinaryClassificationStats'
]
'ClassificationError'
,
'BinaryClassificationStats'
]
...
...
tensorpack/callbacks/param.py
View file @
23e4f928
...
@@ -11,7 +11,7 @@ import os
...
@@ -11,7 +11,7 @@ import os
from
.base
import
Callback
from
.base
import
Callback
from
..utils
import
logger
from
..utils
import
logger
from
..tfutils
import
get_op_tensor_name
from
..tfutils
.common
import
get_op_tensor_name
__all__
=
[
'HyperParam'
,
'GraphVarParam'
,
'ObjAttrParam'
,
__all__
=
[
'HyperParam'
,
'GraphVarParam'
,
'ObjAttrParam'
,
'HyperParamSetter'
,
'HumanHyperParamSetter'
,
'HyperParamSetter'
,
'HumanHyperParamSetter'
,
...
...
tensorpack/callbacks/stats.py
View file @
23e4f928
...
@@ -7,7 +7,7 @@ import numpy as np
...
@@ -7,7 +7,7 @@ import numpy as np
from
.base
import
Callback
from
.base
import
Callback
from
..utils
import
logger
from
..utils
import
logger
from
..tfutils
import
get_op_tensor_name
from
..tfutils
.common
import
get_op_tensor_name
__all__
=
[
'SendStat'
,
'DumpParamAsImage'
,
'InjectShell'
]
__all__
=
[
'SendStat'
,
'DumpParamAsImage'
,
'InjectShell'
]
...
...
tensorpack/graph_builder/input_source.py
View file @
23e4f928
...
@@ -15,7 +15,7 @@ from six.moves import range, zip
...
@@ -15,7 +15,7 @@ from six.moves import range, zip
from
.input_source_base
import
InputSource
from
.input_source_base
import
InputSource
from
..dataflow
import
DataFlow
,
RepeatedData
from
..dataflow
import
DataFlow
,
RepeatedData
from
..tfutils.summary
import
add_moving_summary
from
..tfutils.summary
import
add_moving_summary
from
..tfutils
import
get_op_tensor_name
from
..tfutils
.common
import
get_op_tensor_name
from
..tfutils.tower
import
get_current_tower_context
from
..tfutils.tower
import
get_current_tower_context
from
..utils
import
logger
from
..utils
import
logger
from
..utils.concurrency
import
ShareSessionThread
from
..utils.concurrency
import
ShareSessionThread
...
...
tensorpack/predict/concurrency.py
View file @
23e4f928
...
@@ -10,7 +10,7 @@ import tensorflow as tf
...
@@ -10,7 +10,7 @@ import tensorflow as tf
from
..utils
import
logger
from
..utils
import
logger
from
..utils.concurrency
import
DIE
,
StoppableThread
,
ShareSessionThread
from
..utils.concurrency
import
DIE
,
StoppableThread
,
ShareSessionThread
from
..tfutils.model_utils
import
describe_
model
from
..tfutils.model_utils
import
describe_
trainable_vars
from
.base
import
OnlinePredictor
,
OfflinePredictor
,
AsyncPredictorBase
from
.base
import
OnlinePredictor
,
OfflinePredictor
,
AsyncPredictorBase
__all__
=
[
'MultiProcessPredictWorker'
,
'MultiProcessQueuePredictWorker'
,
__all__
=
[
'MultiProcessPredictWorker'
,
'MultiProcessQueuePredictWorker'
,
...
@@ -41,7 +41,7 @@ class MultiProcessPredictWorker(multiprocessing.Process):
...
@@ -41,7 +41,7 @@ class MultiProcessPredictWorker(multiprocessing.Process):
self
.
predictor
=
OfflinePredictor
(
self
.
config
)
self
.
predictor
=
OfflinePredictor
(
self
.
config
)
if
self
.
idx
==
0
:
if
self
.
idx
==
0
:
with
self
.
predictor
.
graph
.
as_default
():
with
self
.
predictor
.
graph
.
as_default
():
describe_
model
()
describe_
trainable_vars
()
class
MultiProcessQueuePredictWorker
(
MultiProcessPredictWorker
):
class
MultiProcessQueuePredictWorker
(
MultiProcessPredictWorker
):
...
...
tensorpack/tfutils/common.py
View file @
23e4f928
...
@@ -10,10 +10,10 @@ from ..utils.argtools import graph_memoized
...
@@ -10,10 +10,10 @@ from ..utils.argtools import graph_memoized
__all__
=
[
'get_default_sess_config'
,
__all__
=
[
'get_default_sess_config'
,
'get_global_step_value'
,
'get_global_step_value'
,
'get_global_step_var'
,
'get_global_step_var'
,
'get_op_tensor_name'
,
#
'get_op_tensor_name',
'get_tensors_by_names'
,
#
'get_tensors_by_names',
'get_op_or_tensor_by_name'
,
#
'get_op_or_tensor_by_name',
'get_tf_version_number'
,
#
'get_tf_version_number',
]
]
...
...
tensorpack/tfutils/model_utils.py
View file @
23e4f928
...
@@ -8,10 +8,10 @@ from tabulate import tabulate
...
@@ -8,10 +8,10 @@ from tabulate import tabulate
from
..utils
import
logger
from
..utils
import
logger
__all__
=
[
'describe_model'
,
'get_shape_str'
]
__all__
=
[]
def
describe_
model
():
def
describe_
trainable_vars
():
"""
"""
Print a description of the current model parameters.
Print a description of the current model parameters.
Skip variables starting with "tower".
Skip variables starting with "tower".
...
...
tensorpack/tfutils/scope_utils.py
View file @
23e4f928
...
@@ -12,7 +12,7 @@ if six.PY2:
...
@@ -12,7 +12,7 @@ if six.PY2:
else
:
else
:
import
functools
import
functools
__all__
=
[
'
get_name_scope_name'
,
'
auto_reuse_variable_scope'
]
__all__
=
[
'auto_reuse_variable_scope'
]
@
deprecated
(
"Use tf.get_default_graph().get_name_scope() (available since 1.2.1)."
)
@
deprecated
(
"Use tf.get_default_graph().get_name_scope() (available since 1.2.1)."
)
...
...
tensorpack/tfutils/summary.py
View file @
23e4f928
...
@@ -16,8 +16,8 @@ from ..utils.naming import MOVING_SUMMARY_OPS_KEY
...
@@ -16,8 +16,8 @@ from ..utils.naming import MOVING_SUMMARY_OPS_KEY
from
.tower
import
get_current_tower_context
from
.tower
import
get_current_tower_context
from
.symbolic_functions
import
rms
from
.symbolic_functions
import
rms
__all__
=
[
'create_scalar_summary'
,
'add_param_summary'
,
'add_activation_summary'
,
__all__
=
[
'create_scalar_summary'
,
'add_param_summary'
,
'add_moving_summary'
]
'add_
activation_summary'
,
'add_
moving_summary'
]
def
create_scalar_summary
(
name
,
v
):
def
create_scalar_summary
(
name
,
v
):
...
...
tensorpack/tfutils/symbolic_functions.py
View file @
23e4f928
...
@@ -6,6 +6,8 @@ import tensorflow as tf
...
@@ -6,6 +6,8 @@ import tensorflow as tf
from
contextlib
import
contextmanager
from
contextlib
import
contextmanager
import
numpy
as
np
import
numpy
as
np
__all__
=
[]
# this function exists for backwards-compatibilty
# this function exists for backwards-compatibilty
def
prediction_incorrect
(
logits
,
label
,
topk
=
1
,
name
=
'incorrect_vector'
):
def
prediction_incorrect
(
logits
,
label
,
topk
=
1
,
name
=
'incorrect_vector'
):
...
...
tensorpack/tfutils/varmanip.py
View file @
23e4f928
...
@@ -13,7 +13,7 @@ from ..utils import logger
...
@@ -13,7 +13,7 @@ from ..utils import logger
from
.common
import
get_op_tensor_name
from
.common
import
get_op_tensor_name
__all__
=
[
'SessionUpdate'
,
'dump_session_params'
,
'dump_chkpt_vars'
,
__all__
=
[
'SessionUpdate'
,
'dump_session_params'
,
'dump_chkpt_vars'
,
'get_savename_from_varname'
,
'is_training_name'
,
#
'get_savename_from_varname', 'is_training_name',
'get_checkpoint_path'
]
'get_checkpoint_path'
]
...
...
tensorpack/train/base.py
View file @
23e4f928
...
@@ -16,7 +16,7 @@ from ..utils import logger
...
@@ -16,7 +16,7 @@ from ..utils import logger
from
..callbacks
import
Callback
,
Callbacks
,
MaintainStepCounter
from
..callbacks
import
Callback
,
Callbacks
,
MaintainStepCounter
from
..callbacks.monitor
import
Monitors
,
TrainingMonitor
from
..callbacks.monitor
import
Monitors
,
TrainingMonitor
from
..tfutils
import
get_global_step_value
from
..tfutils
import
get_global_step_value
from
..tfutils.model_utils
import
describe_
model
from
..tfutils.model_utils
import
describe_
trainable_vars
from
..tfutils.sesscreate
import
ReuseSessionCreator
from
..tfutils.sesscreate
import
ReuseSessionCreator
from
..tfutils.sessinit
import
JustCurrentSession
from
..tfutils.sessinit
import
JustCurrentSession
...
@@ -127,7 +127,7 @@ class Trainer(object):
...
@@ -127,7 +127,7 @@ class Trainer(object):
self
.
monitors
=
Monitors
(
self
.
monitors
)
self
.
monitors
=
Monitors
(
self
.
monitors
)
self
.
register_callback
(
self
.
monitors
)
self
.
register_callback
(
self
.
monitors
)
describe_
model
()
describe_
trainable_vars
()
# some final operations that might modify the graph
# some final operations that might modify the graph
logger
.
info
(
"Setup callbacks graph ..."
)
logger
.
info
(
"Setup callbacks graph ..."
)
...
...
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