db4fc0e5816a504a87e4a2a603b065c179406a04,xnornet_plusplus/main.py,,main,#,69

Before Change


    for epoch in range(args.start_epoch, args.epochs):
        adjust_learning_rate(optimizer, epoch)

        prec1 = validate(val_loader, model, criterion, epoch)
        // train for one epoch
        train(train_loader, model, criterion, optimizer, epoch)

        // evaluate on validation set

After Change


    // define loss function (criterion) and optimizer
    criterion = nn.CrossEntropyLoss().cuda()

    param_grp_1 = []
    for m in model.modules():
        if isinstance(m,BinConv2d):
            param_grp_1.append(m.weight)
            param_grp_1.append(m.alpha)
            param_grp_1.append(m.beta)
            param_grp_1.append(m.gamma)
    param_grp_1_ids = list(map(id, param_grp_1))
    param_grp_2 = list(filter(lambda p: id(p) not in param_grp_1_ids, model.parameters()))

    if args.optimizer == "sgd":
        if args.quantize:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: sankit1/cv-tricks.com
Commit Name: db4fc0e5816a504a87e4a2a603b065c179406a04
Time: 2020-12-22
Author: kanchan@aimonk.com
File Name: xnornet_plusplus/main.py
Class Name:
Method Name: main


Project Name: OpenMined/Grid
Commit Name: c8df8d4b56686003c0fbfb673df70621c5e8fdcc
Time: 2021-03-25
Author: amrmkayid@gmail.com
File Name: apps/domain/src/main/core/infrastructure/providers/gcp/gcp.py
Class Name: GCP
Method Name: build


Project Name: RasaHQ/rasa
Commit Name: f052ff59e99534c1e19559c4234a7916d40e606a
Time: 2020-09-30
Author: erohmensing@gmail.com
File Name: tests/docs/test_docs_training_data.py
Class Name:
Method Name: test_docs_training_data