Skip to content

请问目前libltp支持单独分词吗 #1

@qinghsui

Description

@qinghsui
   你好,我在使用过程中想只使用分词功能,看目前的pipeline_batch() 方法调用了所有任务。通过查看底层代码,

发现onnxruntime-rs.git?branch=al/dyn+cuda 这个分支提供session 的 run_with_options 方法,
通过以下方法发生段错误,这是onnx 不支持计算部分子图吗? 还是其他原因,谢谢。
let name_seg = String::from("seg");
let output_type_seg = TensorElementDataType::Int64;
let dimensions_seg: Vec<Option> = vec![None, None];
let output = Output{ name: name_seg,
output_type: output_type_seg,
dimensions : dimensions_seg
};
let output_names: Vec = vec![output];
println!("before onnx run with option");
println!("{:?}", output_names);
let mut result = self.session.run_with_options(input_arrays, &output_names)?;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions