4275d25af066b667a0787f9639b652789f9a0338,test/examples/test_batch_gp_regression.py,TestBatchGPRegression,test_train_on_batch_test_on_batch,#TestBatchGPRegression#,108

Before Change


        // Find optimal model hyperparameters
        gp_model.train()
        likelihood.train()
        optimizer = optim.Adam(list(gp_model.parameters()) + list(likelihood.parameters()), lr=0.1)
        optimizer.n_iter = 0
        for _ in range(50):
            optimizer.zero_grad()
            output = gp_model(train_x12)
            loss = -mll(output, train_y12).sum()
            loss.backward()
            optimizer.n_iter += 1
            optimizer.step()

        for param in gp_model.parameters():
            self.assertTrue(param.grad is not None)

After Change


    def test_train_on_batch_test_on_batch(self):
        // We"re manually going to set the hyperparameters to something they shouldn"t be
        likelihood = GaussianLikelihood(
            log_noise_prior=gpytorch.priors.NormalPrior(loc=torch.zeros(2), scale=torch.ones(2), log_transform=True),
            batch_size=2,
        )
        gp_model = ExactGPModel(train_x12, train_y12, likelihood, batch_size=2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: cornellius-gp/gpytorch
Commit Name: 4275d25af066b667a0787f9639b652789f9a0338
Time: 2018-09-28
Author: gpleiss@gmail.com
File Name: test/examples/test_batch_gp_regression.py
Class Name: TestBatchGPRegression
Method Name: test_train_on_batch_test_on_batch


Project Name: epfl-lts2/pygsp
Commit Name: 704174e94846fecfb5162c56d3305057fc4ba734
Time: 2015-09-07
Author: lionel.martin@epfl.ch
File Name: pygsp/graphs/community.py
Class Name: Community
Method Name: __init__


Project Name: deepmipt/DeepPavlov
Commit Name: d771d58a66c57aa77b8ef61501bf879de25c0c8c
Time: 2018-05-24
Author: puleon@mail.ru
File Name: deeppavlov/dataset_iterators/ranking_iterator.py
Class Name: RankingIterator
Method Name: gen_batches