Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.tensorflow
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
bob
bob.learn.tensorflow
Commits
b82ad522
Commit
b82ad522
authored
7 years ago
by
Tiago de Freitas Pereira
Browse files
Options
Downloads
Patches
Plain Diff
Created debug features
parent
22df299b
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!15
Updates
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/learn/tensorflow/script/load_and_debug.py
+46
-0
46 additions, 0 deletions
bob/learn/tensorflow/script/load_and_debug.py
setup.py
+1
-0
1 addition, 0 deletions
setup.py
with
47 additions
and
0 deletions
bob/learn/tensorflow/script/load_and_debug.py
0 → 100644
+
46
−
0
View file @
b82ad522
#!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
"""
Load and debug tensorflow models
Usage:
load_and_debug.py <configuration> <output-dir>
load_and_debug.py -h | --help
Options:
-h --help Show this screen.
"""
from
docopt
import
docopt
import
bob.io.base
import
os
import
numpy
import
imp
import
bob.learn.tensorflow
import
tensorflow
as
tf
import
logging
logger
=
logging
.
getLogger
(
"
bob.learn
"
)
def
main
():
args
=
docopt
(
__doc__
,
version
=
'
Mnist training with TensorFlow
'
)
output_dir
=
args
[
'
<output-dir>
'
]
config
=
imp
.
load_source
(
'
config
'
,
args
[
'
<configuration>
'
])
# Cleaning all variables in case you are loading the checkpoint
tf
.
reset_default_graph
()
if
os
.
path
.
exists
(
output_dir
)
else
None
logger
.
info
(
"
Directory already exists, trying to get the last checkpoint
"
)
trainer
=
config
.
Trainer
(
config
.
train_data_shuffler
,
iterations
=
0
,
analizer
=
None
,
temp_dir
=
output_dir
)
trainer
.
create_network_from_file
(
output_dir
)
import
ipdb
;
ipdb
.
set_trace
();
debug
=
True
This diff is collapsed.
Click to expand it.
setup.py
+
1
−
0
View file @
b82ad522
...
@@ -50,6 +50,7 @@ setup(
...
@@ -50,6 +50,7 @@ setup(
'
compute_statistics.py = bob.learn.tensorflow.script.compute_statistics:main
'
,
'
compute_statistics.py = bob.learn.tensorflow.script.compute_statistics:main
'
,
'
train.py = bob.learn.tensorflow.script.train:main
'
,
'
train.py = bob.learn.tensorflow.script.train:main
'
,
'
bob_db_to_tfrecords = bob.learn.tensorflow.script.db_to_tfrecords:main
'
,
'
bob_db_to_tfrecords = bob.learn.tensorflow.script.db_to_tfrecords:main
'
,
'
load_and_debug.py = bob.learn.tensorflow.script.load_and_debug:main
'
],
],
},
},
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment