Skip to content
This repository has been archived by the owner on Aug 12, 2020. It is now read-only.

Commit

Permalink
Fixed module to work with evaluation.
Browse files Browse the repository at this point in the history
  • Loading branch information
penguinmenac3 committed May 7, 2019
1 parent baa61f7 commit 5b72c21
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions starttf/modules/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,13 @@ def predict(self, inputs, input_placeholders=None):
if self.keras and self.__model is not None:
outputs = self.__model.predict(inputs)
outputs = dict(zip(self.__outputs, outputs))
# Unpack since it gives a batch of 1 output
if isinstance(outputs, dict):
outputs = {k: outputs[k][0] for k in outputs.keys()}
else:
outputs = outputs[0]
return outputs
# Unpack since it gives a batch of 1 output
#if isinstance(outputs, dict):
# outputs = {k: outputs[k][0] for k in outputs.keys()}
#else:
# outputs = outputs[0]
#return outputs
elif self.tensorflow and self.__model is not None:
sess = tf.get_default_session()
if input_placeholders is None:
Expand Down

0 comments on commit 5b72c21

Please sign in to comment.