4ff1e671f251f69ee24f75257abdd0841f2dbdfc,kraken/lib/vgsl.py,TorchVGSLModel,__init__,#TorchVGSLModel#Any#,56

Before Change


        self.input = tuple(input)
        self.nn = torch.nn.Sequential()
        logger.debug("layer\t\ttype")
        for block in blocks:
            oshape = None
            layer = None
            for op in self.ops:
                oshape, name, layer = op(input, block)
                if oshape:
                    break
            if oshape:
                input = oshape
                self.named_spec.append(self.set_layer_name(block, name))
                self.nn.add_module(name, layer)
            else:
                raise ValueError("{} invalid layer definition".format(block))
        self.output = oshape

    def to(self, device):
        self.nn.to(device)

After Change


        input = [batch, channels, height, width]
        self.input = tuple(input)
        self.nn = torch.nn.Sequential()
        self._parse(input, blocks)

    def _parse(self, input, blocks):
        
        Parses VGSL spec and appends layers to self.nn
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mittagessen/kraken
Commit Name: 4ff1e671f251f69ee24f75257abdd0841f2dbdfc
Time: 2018-05-24
Author: mittagessen@l.unchti.me
File Name: kraken/lib/vgsl.py
Class Name: TorchVGSLModel
Method Name: __init__


Project Name: snipsco/snips-nlu
Commit Name: f83dd115acb0d119fa466fad51b473a30749f684
Time: 2017-05-11
Author: clement.doumouro@snips.ai
File Name: snips_nlu/intent_parser/regex_intent_parser.py
Class Name: RegexIntentParser
Method Name: get_slots


Project Name: snipsco/snips-nlu
Commit Name: f83dd115acb0d119fa466fad51b473a30749f684
Time: 2017-05-11
Author: clement.doumouro@snips.ai
File Name: snips_nlu/intent_parser/regex_intent_parser.py
Class Name: RegexIntentParser
Method Name: get_intent