c09ca92e84f45c61f9213a32c7f01627fd467174,deepchem/models/tensorgraph/tensor_graph.py,TensorGraph,predict_proba_on_batch,#TensorGraph#Any#Any#,178
Before Change
if not self.built:
self.build()
if sess is None:
saver = tf.train.Saver()
with tf.Session() as sess:
saver.restore(sess, self.last_checkpoint)
with self._get_tf("Graph").as_default():
retval = predict()
else:
retval = predict()
if self.mode == "classification": // sample, task, class
retval = np.transpose(retval, axes=[1, 0, 2])
elif self.mode == "regression": // sample, task
retval = np.transpose(retval, axes=[1, 0])
After Change
return self.predict_on_generator(generator)
def predict_proba_on_batch(self, X, sess=None):
dataset = NumpyDataset(X=X, y=None)
generator = self.default_generator(dataset, predict=True, pad_batches=False)
return self.predict_proba_on_generator(generator)
def predict(self, dataset, transformers=[], batch_size=None):
Uses self to make predictions on provided Dataset object.
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: deepchem/deepchem
Commit Name: c09ca92e84f45c61f9213a32c7f01627fd467174
Time: 2017-04-12
Author: Karl
File Name: deepchem/models/tensorgraph/tensor_graph.py
Class Name: TensorGraph
Method Name: predict_proba_on_batch
Project Name: deepchem/deepchem
Commit Name: c09ca92e84f45c61f9213a32c7f01627fd467174
Time: 2017-04-12
Author: Karl
File Name: deepchem/models/tensorgraph/tensor_graph.py
Class Name: TensorGraph
Method Name: predict_on_batch
Project Name: deepchem/deepchem
Commit Name: c5f9a908910ab118c465de659a8a90c9d64aa708
Time: 2016-11-14
Author: flee2@stanford.edu
File Name: deepchem/trans/transformers.py
Class Name: PowerTransformer
Method Name: transform