14ef9f02e49ddcdd131cd96aed9a51739b94423b,examples/scanvi/scanvi.py,,main,#Any#,245

Before Change


        scanvi.cuda()

    // Setup an optimizer
    optim = Adam({"lr": args.learning_rate})

    // Tell Pyro to enumerate out y when y is unobserved
    guide = config_enumerate(scanvi.guide, "parallel", expand=True)

After Change


    // Setup an optimizer (Adam) and learning rate scheduler.
    // By default we start with a moderately high learning rate (0.005)
    // and reduce by a factor of 5 after 20 epochs.
    scheduler = MultiStepLR({"optimizer": Adam,
                             "optim_args": {"lr": args.learning_rate},
                             "milestones": [20],
                             "gamma": 0.2})

    // Tell Pyro to enumerate out y when y is unobserved
    guide = config_enumerate(scanvi.guide, "parallel", expand=True)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: uber/pyro
Commit Name: 14ef9f02e49ddcdd131cd96aed9a51739b94423b
Time: 2020-10-16
Author: martinjankowiak@users.noreply.github.com
File Name: examples/scanvi/scanvi.py
Class Name:
Method Name: main


Project Name: uber/pyro
Commit Name: 2d9594cde89a9c1bedcf2b7a7716ad0fcd1ab01d
Time: 2019-11-14
Author: fritzo@uber.com
File Name: tests/infer/test_autoguide.py
Class Name:
Method Name: test_quantiles


Project Name: uber/pyro
Commit Name: 2d9594cde89a9c1bedcf2b7a7716ad0fcd1ab01d
Time: 2019-11-14
Author: fritzo@uber.com
File Name: tests/infer/test_autoguide.py
Class Name:
Method Name: test_median