9f200d963b9646fb50326f7cf6788021ddfe955d,kraken/lib/models.py,,load_any,#Any#,172

Before Change


    seq = None

    fname = abspath(expandvars(expanduser(fname)))
    try:
        seq = load_pronn(fname)
        seq.kind = "proto-pyrnn"
        return seq
    except:
        try:
            seq = load_tlstm(fname)
            return seq
        except Exception as e:
            if PY2:
                try:
                    seq = load_pyrnn(fname)
                    seq.kind = "pyrnn"
                    return seq
                except Exception as e:
                    raise
            else:
                raise

def load_clstm(fname):
    
    Loads a CLSTM model in protobuf format and instantiates an object
    implementing the kraken.lib.SeqRecognizer interface.

After Change


    kind = ""
    fname = abspath(expandvars(expanduser(fname)))
    try:
        nn = TorchVGSLModel.load_model(fname)
        kind = "vgsl"
    except:
        nn = TorchVGSLModel.load_clstm_model(fname)
        kind = "clstm"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: mittagessen/kraken
Commit Name: 9f200d963b9646fb50326f7cf6788021ddfe955d
Time: 2018-04-08
Author: mittagessen@l.unchti.me
File Name: kraken/lib/models.py
Class Name:
Method Name: load_any


Project Name: KhronosGroup/NNEF-Tools
Commit Name: 090d93d59bfcf4c6d52cf942d0b599935a7d1440
Time: 2019-02-26
Author: tamas.danyluk@aimotive.com
File Name: au-zone/nnef_converter/common/nnef_converter.py
Class Name: NNEFImporter
Method Name: run


Project Name: ScottfreeLLC/AlphaPy
Commit Name: d7fb322aea141b4869f15786f7c0d700edaf31e9
Time: 2018-05-21
Author: Mark.R.Conway@gmail.com
File Name: alphapy/model.py
Class Name:
Method Name: load_predictor