c96af58e6ab2f85626e51a331e8479da49329f0e,deepchem/models/tensorflow_models/__init__.py,TensorflowClassifier,predict_proba_on_batch,#TensorflowClassifier#Any#Any#,654

Before Change


    if pad_batch:
      X = pad_features(self.batch_size, X)
    if not self._restored_model:
      self.restore()
    with self.eval_graph.graph.as_default():
      // run eval data through the model
      n_tasks = self.n_tasks
      with self._get_shared_session(train=False).as_default():

After Change


          // weight decay
          if self.penalty != 0.0:
            penalty = model_ops.weight_decay(self.penalty_type, self.penalty)
            loss += penalty

      return loss 

  def fit(self, dataset, nb_epoch=10, max_checkpoints_to_keep=5, 
	  log_every_N_batches=50, **kwargs):
    Fit the model.

    Parameters
    ---------- 
    dataset: dc.data.Dataset
      Dataset object holding training data 
    nb_epoch: 10
      Number of training epochs.
    max_checkpoints_to_keep: int
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: deepchem/deepchem
Commit Name: c96af58e6ab2f85626e51a331e8479da49329f0e
Time: 2017-01-18
Author: joegomes@stanford.edu
File Name: deepchem/models/tensorflow_models/__init__.py
Class Name: TensorflowClassifier
Method Name: predict_proba_on_batch


Project Name: hanxiao/bert-as-service
Commit Name: 4b5b11dfd79fdf0dd0fb268808f3efcbeb9e0021
Time: 2018-11-08
Author: hanhxiao@tencent.com
File Name: server.py
Class Name: ServerWorker
Method Name: run


Project Name: michaelhush/M-LOOP
Commit Name: a334cd6f04461ca8d57f35f0ebde68f5520fd689
Time: 2020-06-15
Author: zakven@mit.edu
File Name: mloop/neuralnet.py
Class Name: SingleNeuralNet
Method Name: load