ONNXKnet.jl is an ONNX backend for Knet as it provides model import functionalities for the Knet.jl machine learning framework. This is heavily inspired by ONNX.jl.
>>> using Knet, ONNXKnet
>>> ONNXKnet.load_model("model.onnx") # produces two files: weights.bson and model.jl
>>> weights = ONNXKnet.load_weights("weights.bson")
>>> model = include("model.jl")
model
is the corresponding Knet model, and can be called just like any other Knet model: model(ip)
, where ip
is the input
with appropriate dimensions.
This package is still under development and quite a few things need to be done here:
-
Add support for other larger models : VGG, face detection, object detection, emotion ferplus and so on.
-
Look into ways of removing code redundacy : Discuss if it's a good idea to add ONNX.jl as a dependency, so that the model interface code can be shared.
Currently supported operators include:
- Reshape
- Conv
- Concat
- Add
- Mul
- Relu
- Maxpool
- AveragePool
- Matmul
- GlobalAveragePool
Contributors are always welcome. Discussion takes place on Julia Slack, either on the #Knet or #ONNX channels.