-
Notifications
You must be signed in to change notification settings - Fork 0
Home
MXReader is a Julia package to read MXNet models. It has been developed in Julia Version 0.5.1-pre+55 (2017-02-13 09:11 UTC) Commit 8d4ef37, Linux 4.4.0.
Travis CI on Linux with Julia stable
The package was tested in presence of the following:
- Julia 0.5
- G++ 4.8+
- JSON 0.8.3
- BinDeps 0.4.7
- Compat 0.9.5
The package requires the presence of MXNet shared C++ library. It would be automatically installed if not present during installation.
julia> Pkg.clone("https://github.com/americast/MXReader.jl.git")
julia> Pkg.build("MXReader")
julia> using MXReader
The model must contain a symbolic network (JSON) file (.json) and a network parameter (binary) file (.params).
Sample models are available at https://github.com/dmlc/mxnet-model-gallery.
In order to read the models, pass the file paths of the JSON and binary files to the function readf
.
Example usage:
julia> MXReader.readf("./Inception-BN-symbol.json","./Inception-BN-0126.params")
This will return an object of type FeedForward
which has the following characteristics:
arch
a symbolic node
arg_params
a hash table containing argument parameters
aux_params
a hash table containg auxilliary parameters
ctx
a context vector determining CPU and GPU usage
Alternately, "MXReader.readf(<symbol file>
, <binary file>
,0)" may be used to print the contents of the model object as text.
Work is in progress to build a model reader which would work even in the absence of the MXNet C++ shared library. It is being developed in the branch
direct
under the same repository.