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
02a5d258
You need to sign in or sign up before continuing.
Commit
02a5d258
authored
Aug 02, 2017
by
Yuxin Wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix build
parent
300d840a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
scripts/dump-model-params.py
scripts/dump-model-params.py
+1
-2
tensorpack/tfutils/varmanip.py
tensorpack/tfutils/varmanip.py
+2
-0
No files found.
scripts/dump-model-params.py
View file @
02a5d258
...
@@ -3,13 +3,12 @@
...
@@ -3,13 +3,12 @@
# File: dump-model-params.py
# File: dump-model-params.py
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
# Author: Yuxin Wu <ppwwyyxx@gmail.com>
import
numpy
as
np
import
argparse
import
argparse
import
tensorflow
as
tf
import
tensorflow
as
tf
import
imp
import
imp
from
tensorpack
import
TowerContext
,
logger
from
tensorpack
import
TowerContext
,
logger
from
tensorpack.tfutils
import
sessinit
,
varmanip
,
get_model_loader
from
tensorpack.tfutils
import
varmanip
,
get_model_loader
from
tensorpack.graph_builder.input_source
import
PlaceholderInput
from
tensorpack.graph_builder.input_source
import
PlaceholderInput
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
...
...
tensorpack/tfutils/varmanip.py
View file @
02a5d258
...
@@ -183,10 +183,12 @@ def load_chkpt_vars(model_path):
...
@@ -183,10 +183,12 @@ def load_chkpt_vars(model_path):
result
[
n
]
=
reader
.
get_tensor
(
n
)
result
[
n
]
=
reader
.
get_tensor
(
n
)
return
result
return
result
def
dump_chkpt_vars
(
model_path
):
def
dump_chkpt_vars
(
model_path
):
logger
.
warn
(
"dump_chkpt_vars was renamed to load_chkpt_vars!"
)
logger
.
warn
(
"dump_chkpt_vars was renamed to load_chkpt_vars!"
)
return
load_chkpt_vars
(
model_path
)
return
load_chkpt_vars
(
model_path
)
def
is_training_name
(
name
):
def
is_training_name
(
name
):
"""
"""
Guess if a name belongs to a training-only variables.
Guess if a name belongs to a training-only variables.
...
...
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