Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.ip.tensorflow_extractor
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
Show more breadcrumbs
bob
bob.ip.tensorflow_extractor
Commits
cf2a49da
There was a problem fetching the pipeline summary.
Commit
cf2a49da
authored
7 years ago
by
Amir MOHAMMADI
Browse files
Options
Downloads
Patches
Plain Diff
restore the old restore functionality
parent
2013764f
No related branches found
No related tags found
1 merge request
!1
Add Facenet
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bob/ip/tensorflow_extractor/Extractor.py
+8
-6
8 additions, 6 deletions
bob/ip/tensorflow_extractor/Extractor.py
with
8 additions
and
6 deletions
bob/ip/tensorflow_extractor/Extractor.py
+
8
−
6
View file @
cf2a49da
...
...
@@ -24,10 +24,10 @@ class Extractor(object):
Path of your checkpoint. If the .meta file is providede the last checkpoint will be loaded.
model :
input_tensor: tf.Tensor used as a data entrypoint. It can be a **tf.placeholder**, the
input_tensor: tf.Tensor used as a data entrypoint. It can be a **tf.placeholder**, the
result of **tf.train.string_input_producer**, etc
graph :
graph :
A tf.Tensor containing the operations to be executed
"""
...
...
@@ -35,13 +35,15 @@ class Extractor(object):
self
.
graph
=
graph
# Initializing the variables of the current graph
self
.
session
=
tf
.
Session
()
self
.
session
=
tf
.
Session
()
self
.
session
.
run
(
tf
.
global_variables_initializer
())
# Loading the last checkpoint and overwriting the current variables
saver
=
tf
.
train
.
Saver
()
if
os
.
path
.
isdir
(
checkpoint_filename
):
if
os
.
path
.
splitext
(
checkpoint_filename
)[
1
]
==
"
.meta
"
:
saver
.
restore
(
self
.
session
,
tf
.
train
.
latest_checkpoint
(
os
.
path
.
dirname
(
checkpoint_filename
)))
elif
os
.
path
.
isdir
(
checkpoint_filename
):
saver
.
restore
(
self
.
session
,
tf
.
train
.
latest_checkpoint
(
checkpoint_filename
))
else
:
saver
.
restore
(
self
.
session
,
checkpoint_filename
)
...
...
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