2ac6c0f5befc75e738ef358827964d6445874d18,api-examples/transformer_utils.py,TransformerBoWPairedModel,encode_response_base,#TransformerBoWPairedModel#Any#,448

Before Change


    def encode_response_base(self, response):
        response_lengths = torch.sum(response != Offsets.PAD, dim=1)
        embedded = self.embeddings({"x": response})
        return self.reduction_layer_2((embedded, response_lengths))
        return encoded_response


def get_lr_decay(sched_type, lr, steps_per_epoch, n_epochs, logger, decay_steps=None, decay_rate=None, alpha=None):

After Change



    def encode_response_base(self, response):
        response_lengths = torch.sum(response != Offsets.PAD, dim=1)
        with torch.no_grad() if self.freeze else contextlib.ExitStack():
            embedded = self.embeddings({"x": response})
        encoded_response = self.reduction_layer_2((embedded, response_lengths))
        return encoded_response

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dpressel/mead-baseline
Commit Name: 2ac6c0f5befc75e738ef358827964d6445874d18
Time: 2021-02-20
Author: dpressel@gmail.com
File Name: api-examples/transformer_utils.py
Class Name: TransformerBoWPairedModel
Method Name: encode_response_base


Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: 5674f7af85b212633236ec45683ba94c67dca779
Time: 2016-10-21
Author: ehankland@google.com
File Name: perfkitbenchmarker/configs/__init__.py
Class Name:
Method Name: _LoadUserConfig


Project Name: tyarkoni/pliers
Commit Name: de6d474bd667cc040856792cce62148691fbabda
Time: 2017-05-08
Author: quinten.mcnamara@gmail.com
File Name: pliers/extractors/api.py
Class Name: ClarifaiAPIExtractor
Method Name: _extract