b68b8486821ffba94884e2060f3c2a68e980606a,snorkel/contrib/lstm/lstm_base.py,LSTMBase,train,#LSTMBase#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,96

Before Change


            epoch_loss = 0.0
            for i in range(0, len(x_train), batch_size):
                // Get batch tensors
                r          = min(n, i+batch_size)
                x_b, len_b = self._make_tensor(x_train[i:r])
                y_b        = y_train[i:r]
                // Run training step and evaluate loss function                  
                epoch_loss += self.session.run([self.loss, self.train_fn], {

After Change


            // Print training stats
            if verbose and (t % print_freq == 0 or t in [0, (n_epochs-1)]):
                print("[{0}] Epoch {1} ({2:.2f}s)\tAverage loss={3:.6f}".format(
                    self.name, t, time() - st, np.mean(epoch_loss)
                ))
        if verbose:
            print("[{0}] Training done ({1:.2f}s)".format(self.name, time()-st))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: snorkel-team/snorkel
Commit Name: b68b8486821ffba94884e2060f3c2a68e980606a
Time: 2017-03-18
Author: henry.ehrenberg@outlook.com
File Name: snorkel/contrib/lstm/lstm_base.py
Class Name: LSTMBase
Method Name: train


Project Name: bambinos/bambi
Commit Name: 5bb62768d064583aef9efaf5b0838878e11f71e3
Time: 2016-08-14
Author: tyarkoni@gmail.com
File Name: bambi/models.py
Class Name: RandomTerm
Method Name: _setup


Project Name: reinforceio/tensorforce
Commit Name: cf6d258c003a5a5b5073830e73e4580aeaf71d45
Time: 2017-06-24
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/core/preprocessing/normalize.py
Class Name: Normalize
Method Name: process