📌  相关文章
📜  RuntimeError: 请在 TF 2.0 中使用 tf.experimental.tensorrt.Converter.站点:stackoverflow.com - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:20.972000             🧑  作者: Mango

代码示例1
params = trt.DEFAULT_TRT_CONVERSION_PARAMS._replace(
    precision_mode='FP16',
    is_dynamic_op=True)
    
converter = trt.TrtGraphConverterV2(
    input_saved_model_dir=saved_model_dir,
    conversion_params=params)
converter.convert()
saved_model_dir_trt = "/tmp/model.trt"
converter.save(saved_model_dir_trt)