Skip to content

Commit

Permalink
Removed the custom-predict method
Browse files Browse the repository at this point in the history
  • Loading branch information
vsomnath committed Jan 15, 2019
1 parent db43fe5 commit 2e0df36
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions contrib/hagcn/hagcn_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,34 +194,3 @@ def default_generator(self,
feed_dict[self.X] = atom_features

yield feed_dict

# def predict(self, dataset, transformers=[], outputs=None):
# """
# Uses self to make predictions on provided Dataset object.
#
# Parameters
# ----------
# dataset: dc.data.Dataset
# Dataset to make prediction on
# transformers: list
# List of dc.trans.Transformers.
# outputs: object
# If outputs is None, then will assume outputs=self.default_outputs. If outputs is
# a Layer/Tensor, then will evaluate and return as a single ndarray. If
# outputs is a list of Layers/Tensors, will return a list of ndarrays.
#
# Returns
# -------
# results: numpy ndarray or list of numpy ndarrays
# """
# generator = self.default_generator(dataset, predict=True, pad_batches=True)
# preds = self.predict_on_generator(generator, transformers, outputs)
# if len(dataset.y) % self.batch_size == 0:
# return preds
# else:
# after_pad = (len(dataset.y) // self.batch_size + 1) * self.batch_size
# closest = (len(dataset.y) // self.batch_size) * self.batch_size
# remainder = len(dataset.y) % self.batch_size
# num_added = after_pad - remainder - closest
# preds = preds[:-num_added]
# return preds

0 comments on commit 2e0df36

Please sign in to comment.