9f200d963b9646fb50326f7cf6788021ddfe955d,kraken/lib/models.py,,load_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
nn = TorchVGSLModel.load_clstm_model(fname)
kind = "clstm"
if not nn:
raise KrakenInvalidModelException("File {} not loadable by any parser.".format(fname))
seq = TorchSeqRecognizer(nn)
seq.kind = kind
return seq
def load_pronn(fname):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
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: luispedro/mahotas
Commit Name: 64624fb2b46a228fef1141e1ded84e52acccaf6e
Time: 2015-06-09
Author: luis@luispedro.org
File Name: bin/mahotas-features.py
Class Name:
Method Name: main
Project Name: fperazzi/proSR
Commit Name: 6b7b82ff60b8ca7a26b50e50210a06a46bdc848a
Time: 2018-07-09
Author: fperazzi@adobe.com
File Name: lib/prosr/models/generators.py
Class Name: ProSR
Method Name: forward