Ejemplo n.º 1
0
def get_logits(
    context,
    model_snapshot,
    test_path,
    use_cuda,
    output_path,
    field_names,
    dump_raw_input,
    batch_size,
    ndigits_precision,
    output_columns,
    use_gzip,
    device_id,
):
    """print logits from  a trained model snapshot to output_path"""

    model_snapshot, use_cuda, _ = _get_model_snapshot(context, model_snapshot,
                                                      use_cuda, False)
    if output_columns:
        output_columns = [int(x) for x in output_columns.split(",")]

    print("\n=== Starting get_logits...")
    workflow_get_logits(
        model_snapshot,
        use_cuda,
        output_path,
        test_path,
        field_names,
        dump_raw_input,
        batch_size,
        ndigits_precision,
        output_columns,
        use_gzip,
        device_id,
    )
Ejemplo n.º 2
0
def get_logits(context, model_snapshot, test_path, use_cuda, output_path, field_names):
    """print logits from  a trained model snapshot to output_path
    """

    model_snapshot, use_cuda, _ = _get_model_snapshot(
        context, model_snapshot, use_cuda, False
    )
    print("\n=== Starting get_logits...")
    workflow_get_logits(model_snapshot, use_cuda, output_path, test_path, field_names)