a38ac8958ebf1c61a10c4d5320f1e31d3d0b73dd,trainer.py,Trainer,__init__,#Trainer#,27

Before Change


        if self.use_gpu:
            self.model.cuda()

        print("[*] Number of model parameters: {:,}".format(
            sum([p.data.nelement() for p in self.model.parameters()])))

        // // initialize optimizer and scheduler
        // self.optimizer = optim.SGD(
        //     self.model.parameters(), lr=self.lr, momentum=self.momentum,

After Change


        
        self.config = config

        if config.use_gpu and torch.cuda.is_available():
            self.device = torch.device("cuda")
        else:
            self.device = torch.device("cpu")

        // glimpse network params
        self.patch_size = config.patch_size
        self.glimpse_scale = config.glimpse_scale
        self.num_patches = config.num_patches
        self.loc_hidden = config.loc_hidden
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: a38ac8958ebf1c61a10c4d5320f1e31d3d0b73dd
Time: 2020-05-23
Author: kevinarmandzakka@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: __init__


Project Name: abhiskk/fast-neural-style
Commit Name: 3b825a18923f298067ac8ece781d01e83ab84016
Time: 2017-04-03
Author: abhishekkadiyan@gmail.com
File Name: neural_style/neural_style.py
Class Name:
Method Name: train


Project Name: modAL-python/modAL
Commit Name: caec2c73aad40c0e632e978964ec5c3cf4773c9e
Time: 2019-06-02
Author: theodore.danka@gmail.com
File Name: examples/pytorch_integration.py
Class Name:
Method Name:


Project Name: interactiveaudiolab/nussl
Commit Name: 4ef8f94ea8f6fc3cc1f35743e7c7af0b92ffb76b
Time: 2018-11-29
Author: prem@u.northwestern.edu
File Name: nussl/separation/deep_separation.py
Class Name: DeepSeparation
Method Name: __init__