f466871be6ee80533c997cf6c958aa41a697936f,trainer.py,Trainer,train_one_epoch,#Trainer#,137

Before Change


            img, target = Variable(img), Variable(target)

            // initialize location and hidden state vectors
            h_t = torch.zeros(self.batch_size, self.hidden_size)
            l_t = torch.Tensor(self.batch_size, 2).uniform_(-1, 1)
            h_t, l_t = Variable(h_t), Variable(l_t)

            for t in range(self.num_glimpses - 1):
                // forward pass through model
                h_t, l_t = self.model(img, l_t, h_t)

                // bookeeping for later plotting
                self.locs.append(l_t)

            // last iteration
            probas = self.model(img, l_t, h_t, last=True)

            // to be continued

After Change



        tic = time.time()
        for i, (x, y) in enumerate(self.train_loader):
            x, y = Variable(x), Variable(y)

            self.clear()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: f466871be6ee80533c997cf6c958aa41a697936f
Time: 2018-01-22
Author: kevinarmandzakka@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: train_one_epoch


Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: bc4dfbcc2ecae4b3a4bedc2bd18909a9208c05cb
Time: 2018-06-01
Author: eriklindernoren@gmail.com
File Name: train.py
Class Name:
Method Name:


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: ca7a5e9a39478054dbdfbfba9963b13c80b768f8
Time: 2018-03-14
Author: max.lapan@gmail.com
File Name: ch18/telegram-bot.py
Class Name: Session
Method Name: move_bot