Commit 1853b5cd authored by Bharath Ramsundar's avatar Bharath Ramsundar
Browse files

Changes for support models

parent 5328e3a8
Loading
Loading
Loading
Loading
+15 −2
Original line number Diff line number Diff line
@@ -277,7 +277,7 @@ class NumpyDataset(Dataset):
      for j in range(len(interval_points)-1):
        indices = range(interval_points[j], interval_points[j+1])
        perm_indices = sample_perm[indices]
        X_batch = dataset._X[perm_indices, :]
        X_batch = dataset._X[perm_indices]
        y_batch = dataset._y[perm_indices]
        w_batch = dataset._w[perm_indices]
        ids_batch = dataset._ids[perm_indices]
@@ -875,9 +875,22 @@ class DiskDataset(Dataset):
  def X(self):
    """Get the X vector for this dataset as a single numpy array."""
    Xs = []
    ##################################################### DEBUG
    #print("dataset.X computation.")
    one_dimensional = False
    ##################################################### DEBUG
    for (X_b, _, _, _) in self.itershards():
      Xs.append(X_b)
      ##################################################### DEBUG
      #print("X_b.shape")
      #print(X_b.shape)
      if len(X_b.shape) == 1:
        one_dimensional = True
      ##################################################### DEBUG
    if not one_dimensional:
      return np.vstack(Xs)
    else:
      return np.concatenate(Xs)

  @property
  def y(self):