Commit 49199143 authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Some test fixes

parent ae48627a
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -334,9 +334,9 @@ class TensorflowGraph(object):

        logging.info('Eval batch took %g seconds', time.time() - start)

        labels = from_one_hot(np.squeeze(np.concatenate(labels)))
        labels = np.array(from_one_hot(np.squeeze(np.concatenate(labels))))

      return labels
    return np.copy(labels)

  def add_output_ops(self):
    """Replace logits with softmax outputs."""
@@ -727,7 +727,7 @@ class TensorflowModel(Model):
    """
    Makes predictions on batch of data.
    """
    self.eval_model.predict_on_batch(X)
    return self.eval_model.predict_on_batch(X)

  def save(self, logdir):
    """
+0 −1
Original line number Diff line number Diff line
@@ -38,7 +38,6 @@ def to_one_hot(y):
      y_hot[index] = np.array([0, 1])
  return y_hot


def from_one_hot(y):
  """Transorms label vector from one-hot encoding.