0347e36737b25671dff14c6c1bbbe5d090d71a06,deepcut/deepcut.py,,,#,6

Before Change


from .model import get_convo_nn2

module_path = os.path.dirname(__file__)
object_path = os.path.join(module_path, "weight", "object.pk")
weight_path = os.path.join(module_path, "weight", "best_cnn3.h5")

with open(object_path, "rb") as handle:
    char_le, type_le, listed_char = pickle.load(handle)

CHAR_TYPE = {
    "กขฃคฆงจชซญฎฏฐฑฒณดตถทธนบปพฟภมยรลวศษสฬอ": "c",
    "ฅฉผฟฌหฮ": "n",

After Change


]
CHARS_MAP = {v: k for k, v in enumerate(CHARS)}

CHAR_TYPES = [
    "b_e", "c", "d", "n", "o",
    "p", "q", "s", "s_e", "t",
    "v", "w"
]
CHAR_TYPES_MAP = {v: k for k, v in enumerate(CHAR_TYPES)}

// load model when importing library
model = get_convo_nn2()
model.load_weights(weight_path)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: rkcosmos/deepcut
Commit Name: 0347e36737b25671dff14c6c1bbbe5d090d71a06
Time: 2017-06-28
Author: titipata@allenai.org
File Name: deepcut/deepcut.py
Class Name:
Method Name:


Project Name: CSAILVision/places365
Commit Name: 3a4a56e15dc30e5f7d9c4c7706f5710d1da73e52
Time: 2018-05-02
Author: zhoubolei@gmail.com
File Name: run_placesCNN_basic.py
Class Name:
Method Name:


Project Name: CSAILVision/places365
Commit Name: 3a4a56e15dc30e5f7d9c4c7706f5710d1da73e52
Time: 2018-05-02
Author: zhoubolei@gmail.com
File Name: run_placesCNN_unified.py
Class Name:
Method Name: load_model