def make_audio_temp_deploy(folder, prototxt, temp_file_name = "temp_deploy.prototxt"):
    WINDOW_SIZE = sbd.config.getint('windowing', 'window_size')
    FEATURE_LENGTH = 4

    with file(prototxt, "r") as input_:
        nc = NetConfig(input_)
    nc.transform_deploy([1, 1, WINDOW_SIZE, FEATURE_LENGTH])
    temp_proto = "%s/%s" % (folder, temp_file_name)
    with file(temp_proto, "w") as output:
        nc.write_to(output)

    return temp_proto
def make_lexical_temp_deploy(folder, prototxt, temp_file_name = "temp_deploy.prototxt"):
    WINDOW_SIZE = sbd.config.getint('windowing', 'window_size')
    FEATURE_LENGTH = 300 if not sbd.config.getboolean('features', 'pos_tagging') else 300 + len(PosTag)

    with file(prototxt, "r") as input_:
        nc = NetConfig(input_)
    nc.transform_deploy([1, 1, WINDOW_SIZE, FEATURE_LENGTH])
    temp_proto = "%s/%s" % (folder, temp_file_name)
    with file(temp_proto, "w") as output:
        nc.write_to(output)

    return temp_proto
def make_audio_temp_deploy(folder,
                           prototxt,
                           temp_file_name="temp_deploy.prototxt"):
    WINDOW_SIZE = sbd.config.getint('windowing', 'window_size')
    FEATURE_LENGTH = 4

    with file(prototxt, "r") as input_:
        nc = NetConfig(input_)
    nc.transform_deploy([1, 1, WINDOW_SIZE, FEATURE_LENGTH])
    temp_proto = "%s/%s" % (folder, temp_file_name)
    with file(temp_proto, "w") as output:
        nc.write_to(output)

    return temp_proto
def make_lexical_temp_deploy(folder,
                             prototxt,
                             temp_file_name="temp_deploy.prototxt"):
    WINDOW_SIZE = sbd.config.getint('windowing', 'window_size')
    FEATURE_LENGTH = 300 if not sbd.config.getboolean(
        'features', 'pos_tagging') else 300 + len(PosTag)

    with file(prototxt, "r") as input_:
        nc = NetConfig(input_)
    nc.transform_deploy([1, 1, WINDOW_SIZE, FEATURE_LENGTH])
    temp_proto = "%s/%s" % (folder, temp_file_name)
    with file(temp_proto, "w") as output:
        nc.write_to(output)

    return temp_proto