bd797415b7a6b2f1181be8fbaa886dd3b00feb63,pyprob/nn/inference_network.py,InferenceNetwork,optimize,#InferenceNetwork#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,322

Before Change



        // Validation data loader
        if dataset_valid is not None:
            if isinstance(dataset_valid, OfflineDataset):
                if distributed_world_size == 1:
                    dataloader_valid = DataLoader(dataset_valid, batch_sampler=TraceBatchSampler(dataset_valid, batch_size=batch_size, shuffle_batches=True), num_workers=dataloader_offline_num_workers, collate_fn=lambda x: Batch(x))
                else:
                    dataloader_valid = DataLoader(dataset_valid, batch_sampler=DistributedTraceBatchSampler(dataset_valid, batch_size=batch_size, num_buckets=distributed_num_buckets, shuffle_batches=True, shuffle_buckets=True), num_workers=dataloader_offline_num_workers, collate_fn=lambda x: Batch(x))
            else:
                dataloader_valid = DataLoader(dataset_valid, batch_size=batch_size, num_workers=0, collate_fn=lambda x: Batch(x))

        while not stop:
            epoch += 1
            for i_batch, batch in enumerate(dataloader):
                // Important, a self._distributed_sync_parameters() needs to happen at the very beginning of a training

After Change


            else:
                dataloader_valid = DataLoader(dataset_valid, batch_sampler=DistributedTraceBatchSampler(dataset_valid, batch_size=batch_size, num_buckets=distributed_num_buckets, shuffle_batches=True, shuffle_buckets=True), num_workers=dataloader_offline_num_workers, collate_fn=lambda x: Batch(x))
            if not self._layers_pre_generated:
                for i_batch, batch in enumerate(dataloader_valid):
                    self._polymorph(batch)

        while not stop:
            epoch += 1
            for i_batch, batch in enumerate(dataloader):
                // Important, a self._distributed_sync_parameters() needs to happen at the very beginning of a training
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: pyprob/pyprob
Commit Name: bd797415b7a6b2f1181be8fbaa886dd3b00feb63
Time: 2019-02-25
Author: atilimgunes.baydin@gmail.com
File Name: pyprob/nn/inference_network.py
Class Name: InferenceNetwork
Method Name: optimize


Project Name: HsinYingLee/DRIT
Commit Name: 8776ca2dcfa98412a6dafc33d360ee1ba0d1b551
Time: 2018-07-25
Author: james371507@gmail.com
File Name: src/test.py
Class Name:
Method Name: main


Project Name: facebookresearch/Horizon
Commit Name: dfa0f741a47d3b957caac67fbb59efdd1c9294d4
Time: 2020-05-08
Author: kaiwenw@fb.com
File Name: reagent/workflow/utils.py
Class Name:
Method Name: train_and_evaluate_generic