Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.learn.tensorflow
Commits
c5f684f5
Commit
c5f684f5
authored
Nov 17, 2016
by
Tiago de Freitas Pereira
Browse files
Fixed bug validation
parent
bf2fd38f
Changes
4
Hide whitespace changes
Inline
Side-by-side
bob/learn/tensorflow/analyzers/ExperimentAnalizer.py
View file @
c5f684f5
...
...
@@ -65,12 +65,12 @@ class ExperimentAnalizer:
# Extracting features for enrollment
enroll_data
,
enroll_labels
=
base_data_shuffler
.
get_batch
()
enroll_features
=
network
(
enroll_data
,
session
=
session
)
enroll_features
=
network
(
enroll_data
)
del
enroll_data
# Extracting features for probing
probe_data
,
probe_labels
=
base_data_shuffler
.
get_batch
()
probe_features
=
network
(
probe_data
,
session
=
session
)
probe_features
=
network
(
probe_data
)
del
probe_data
# Creating models
...
...
bob/learn/tensorflow/network/SequenceNetwork.py
View file @
c5f684f5
...
...
@@ -322,8 +322,11 @@ class SequenceNetwork(six.with_metaclass(abc.ABCMeta, object)):
session
=
Session
.
instance
().
session
self
.
sequence_net
=
pickle
.
loads
(
open
(
path
+
"_sequence_net.pickle"
).
read
())
saver
=
tf
.
train
.
import_meta_graph
(
path
+
".meta"
,
clear_devices
=
clear_devices
)
#saver = tf.train.import_meta_graph(path + ".meta")
if
clear_devices
:
saver
=
tf
.
train
.
import_meta_graph
(
path
+
".meta"
,
clear_devices
=
clear_devices
)
else
:
saver
=
tf
.
train
.
import_meta_graph
(
path
+
".meta"
)
saver
.
restore
(
session
,
path
)
self
.
inference_graph
=
tf
.
get_collection
(
"inference_graph"
)[
0
]
self
.
inference_placeholder
=
tf
.
get_collection
(
"inference_placeholder"
)[
0
]
...
...
bob/learn/tensorflow/trainers/SiameseTrainer.py
View file @
c5f684f5
...
...
@@ -256,7 +256,7 @@ class SiameseTrainer(Trainer):
"""
if
self
.
validation_summary_writter
is
None
:
self
.
validation_summary_writter
=
tf
.
train
.
SummaryWriter
(
os
.
path
.
join
(
self
.
temp_dir
,
'validation'
),
session
.
graph
)
self
.
validation_summary_writter
=
tf
.
train
.
SummaryWriter
(
os
.
path
.
join
(
self
.
temp_dir
,
'validation'
),
self
.
session
.
graph
)
self
.
validation_graph
=
self
.
compute_graph
(
data_shuffler
,
name
=
"validation"
,
training
=
False
)
feed_dict
=
self
.
get_feed_dict
(
data_shuffler
)
...
...
bob/learn/tensorflow/trainers/Trainer.py
View file @
c5f684f5
...
...
@@ -440,7 +440,7 @@ class Trainer(object):
# Running validation
if
validation_data_shuffler
is
not
None
and
step
%
self
.
validation_snapshot
==
0
:
self
.
compute_validation
(
self
.
session
,
validation_data_shuffler
,
step
)
self
.
compute_validation
(
validation_data_shuffler
,
step
)
if
self
.
analizer
is
not
None
:
self
.
validation_summary_writter
.
add_summary
(
self
.
analizer
(
...
...
Write
Preview
Supports
Markdown
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