TVM 可以加载编译的模型种类

博客介绍了在TVM中,relay是一种模型描述的IR,可将各种模型编译成relay后进行优化,还给出了使用tvm.relay.frontend.from_onnx加载onnx模型的示例用法。

 

relay 本质上在TVM中就是一种模型描述的IR, 将各种模型编译成relay后再进行一步优化

示例用法: tvm.relay.frontend.from_onnx("/path/to/onnx/model")  加载onnx模型

 

 

tvm.relay.frontend

Functions:

from_caffe(init_net, predict_net, …)

Convert from caffe model into compatible relay Function.

from_caffe2(init_net, predict_net[, shape, …])

Load caffe2 graph which contains init_net and predict_net into Relay Function.

from_coreml(model[, shape])

Convert from coreml model into Relay Function.

from_darknet(net[, shape, dtype])

Convert from Darknet’s model into compatible relay Function.

from_keras(model[, shape, layout])

Convert keras model to relay Function.

from_mxnet(symbol[, shape, dtype, …])

Convert from MXNet”s model into compatible relay Function.

from_onnx(model[, shape, dtype, opset, …])

Convert a ONNX model into an equivalent Relay Function.

from_pytorch(script_module, input_infos[, …])

Load PyTorch model in the form of a scripted PyTorch model and convert into relay.

from_tensorflow(graph[, layout, shape, outputs])

Load tensorflow graph which is a python tensorflow graph object into relay.

from_tflite(model[, shape_dict, dtype_dict])

Convert from tflite model into compatible relay Function.

quantize_conv_bias_mkldnn_from_var(bias_var, …)

Quantized conv2d bias

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值