├── _config.yml ├── backend ├── x │ ├── README.md │ └── gorgonnx │ │ ├── doc.go │ │ ├── example_operator.go │ │ ├── uniq.go │ │ ├── errors.go │ │ ├── div_integer.go │ │ ├── constant.go │ │ ├── identity.go │ │ ├── dropout.go │ │ ├── gap.go │ │ └── shape.go ├── simple │ ├── README.md │ ├── doc.go │ └── sort.go ├── testbackend │ ├── testreport │ │ ├── README.md │ │ ├── coverage.go │ │ ├── coverage_test.go │ │ └── report.go │ ├── onnx │ │ ├── doc.go │ │ ├── onnx_test_abs_test.go │ │ ├── onnx_test_acos_test.go │ │ ├── onnx_test_add_test.go │ │ ├── onnx_test_asin_test.go │ │ ├── onnx_test_atan_test.go │ │ ├── onnx_test_ceil_test.go │ │ ├── onnx_test_clip_test.go │ │ ├── onnx_test_cos_test.go │ │ ├── onnx_test_cosh_test.go │ │ ├── onnx_test_div_test.go │ │ ├── onnx_test_elu_test.go │ │ ├── onnx_test_erf_test.go │ │ ├── onnx_test_exp_test.go │ │ ├── onnx_test_log_test.go │ │ ├── onnx_test_lrn_test.go │ │ ├── onnx_test_mul_test.go │ │ ├── onnx_test_mvn_test.go │ │ ├── onnx_test_neg_test.go │ │ ├── onnx_test_pow_test.go │ │ ├── onnx_test_relu_test.go │ │ ├── onnx_test_selu_test.go │ │ ├── onnx_test_sign_test.go │ │ ├── onnx_test_sin_test.go │ │ ├── onnx_test_sinh_test.go │ │ ├── onnx_test_size_test.go │ │ ├── onnx_test_sqrt_test.go │ │ ├── onnx_test_sub_test.go │ │ ├── onnx_test_tan_test.go │ │ ├── onnx_test_tanh_test.go │ │ ├── onnx_test_tile_test.go │ │ ├── onnx_test_top_k_test.go │ │ ├── onnx_test_acosh_test.go │ │ ├── onnx_test_asinh_test.go │ │ ├── onnx_test_atanh_test.go │ │ ├── onnx_test_floor_test.go │ │ ├── onnx_test_shape_test.go │ │ ├── onnx_test_slice_test.go │ │ ├── onnx_test_edge_pad_test.go │ │ ├── onnx_test_gather_0_test.go │ │ ├── onnx_test_gather_1_test.go │ │ ├── onnx_test_sigmoid_test.go │ │ ├── onnx_test_squeeze_test.go │ │ ├── onnx_test_add_bcast_test.go │ │ ├── onnx_test_constant_test.go │ │ ├── onnx_test_div_bcast_test.go │ │ ├── onnx_test_identity_test.go │ │ ├── onnx_test_leakyrelu_test.go │ │ ├── onnx_test_matmul_2d_test.go │ │ ├── onnx_test_matmul_3d_test.go │ │ ├── onnx_test_matmul_4d_test.go │ │ ├── onnx_test_mul_bcast_test.go │ │ ├── onnx_test_roialign_test.go │ │ ├── onnx_test_scan9_sum_test.go │ │ ├── onnx_test_slice_neg_test.go │ │ ├── onnx_test_softplus_test.go │ │ ├── onnx_test_softsign_test.go │ │ ├── onnx_test_sub_bcast_test.go │ │ ├── onnx_test_unsqueeze_test.go │ │ ├── onnx_test_cos_example_test.go │ │ ├── onnx_test_div_example_test.go │ │ ├── onnx_test_elu_default_test.go │ │ ├── onnx_test_elu_example_test.go │ │ ├── onnx_test_exp_example_test.go │ │ ├── onnx_test_hardsigmoid_test.go │ │ ├── onnx_test_log_example_test.go │ │ ├── onnx_test_lrn_default_test.go │ │ ├── onnx_test_max_example_test.go │ │ ├── onnx_test_min_example_test.go │ │ ├── onnx_test_mul_example_test.go │ │ ├── onnx_test_neg_example_test.go │ │ ├── onnx_test_pow_example_test.go │ │ ├── onnx_test_reciprocal_test.go │ │ ├── onnx_test_reflect_pad_test.go │ │ ├── onnx_test_shrink_hard_test.go │ │ ├── onnx_test_shrink_soft_test.go │ │ ├── onnx_test_sin_example_test.go │ │ ├── onnx_test_sub_example_test.go │ │ ├── onnx_test_sum_example_test.go │ │ ├── onnx_test_tan_example_test.go │ │ ├── onnx_test_acos_example_test.go │ │ ├── onnx_test_acosh_example_test.go │ │ ├── onnx_test_asin_example_test.go │ │ ├── onnx_test_asinh_example_test.go │ │ ├── onnx_test_atan_example_test.go │ │ ├── onnx_test_atanh_example_test.go │ │ ├── onnx_test_ceil_example_test.go │ │ ├── onnx_test_clip_example_test.go │ │ ├── onnx_test_clip_inbounds_test.go │ │ ├── onnx_test_constant_pad_test.go │ │ ├── onnx_test_cosh_example_test.go │ │ ├── onnx_test_depthtospace_test.go │ │ ├── onnx_test_flatten_axis0_test.go │ │ ├── onnx_test_flatten_axis1_test.go │ │ ├── onnx_test_flatten_axis2_test.go │ │ ├── onnx_test_flatten_axis3_test.go │ │ ├── onnx_test_floor_example_test.go │ │ ├── onnx_test_hardmax_axis_0_test.go │ │ ├── onnx_test_hardmax_axis_1_test.go │ │ ├── onnx_test_hardmax_axis_2_test.go │ │ ├── onnx_test_max_one_input_test.go │ │ ├── onnx_test_max_two_inputs_test.go │ │ ├── onnx_test_mean_example_test.go │ │ ├── onnx_test_mean_one_input_test.go │ │ ├── onnx_test_min_one_input_test.go │ │ ├── onnx_test_min_two_inputs_test.go │ │ ├── onnx_test_mod_broadcast_test.go │ │ ├── onnx_test_mod_int64_fmod_test.go │ │ ├── onnx_test_prelu_example_test.go │ │ ├── onnx_test_reduce_log_sum_test.go │ │ ├── onnx_test_selu_default_test.go │ │ ├── onnx_test_selu_example_test.go │ │ ├── onnx_test_shape_example_test.go │ │ ├── onnx_test_sinh_example_test.go │ │ ├── onnx_test_size_example_test.go │ │ ├── onnx_test_softmax_axis_0_test.go │ │ ├── onnx_test_softmax_axis_1_test.go │ │ ├── onnx_test_softmax_axis_2_test.go │ │ ├── onnx_test_sqrt_example_test.go │ │ ├── onnx_test_sum_one_input_test.go │ │ ├── onnx_test_sum_two_inputs_test.go │ │ ├── onnx_test_tanh_example_test.go │ │ ├── onnx_test_clip_outbounds_test.go │ │ ├── onnx_test_concat_1d_axis_0_test.go │ │ ├── onnx_test_concat_2d_axis_0_test.go │ │ ├── onnx_test_concat_2d_axis_1_test.go │ │ ├── onnx_test_concat_3d_axis_0_test.go │ │ ├── onnx_test_concat_3d_axis_1_test.go │ │ ├── onnx_test_concat_3d_axis_2_test.go │ │ ├── onnx_test_convtranspose_test.go │ │ ├── onnx_test_dropout_default_test.go │ │ ├── onnx_test_dropout_random_test.go │ │ ├── onnx_test_gemm_broadcast_test.go │ │ ├── onnx_test_globalmaxpool_test.go │ │ ├── onnx_test_hardmax_example_test.go │ │ ├── onnx_test_hardmax_one_hot_test.go │ │ ├── onnx_test_maxpool_2d_ceil_test.go │ │ ├── onnx_test_maxpool_2d_pads_test.go │ │ ├── onnx_test_mean_two_inputs_test.go │ │ ├── onnx_test_pow_bcast_array_test.go │ │ ├── onnx_test_prelu_broadcast_test.go │ │ ├── onnx_test_reshape_one_dim_test.go │ │ ├── onnx_test_resize_nearest_test.go │ │ ├── onnx_test_sigmoid_example_test.go │ │ ├── onnx_test_slice_neg_steps_test.go │ │ ├── onnx_test_softmax_example_test.go │ │ ├── onnx_test_clip_default_max_test.go │ │ ├── onnx_test_clip_default_min_test.go │ │ ├── onnx_test_clip_splitbounds_test.go │ │ ├── onnx_test_convtranspose_1d_test.go │ │ ├── onnx_test_convtranspose_3d_test.go │ │ ├── onnx_test_gemm_nobroadcast_test.go │ │ ├── onnx_test_logsoftmax_axis_0_test.go │ │ ├── onnx_test_logsoftmax_axis_1_test.go │ │ ├── onnx_test_logsoftmax_axis_2_test.go │ │ ├── onnx_test_onehot_with_axis_test.go │ │ ├── onnx_test_pow_bcast_scalar_test.go │ │ ├── onnx_test_scatter_with_axis_test.go │ │ ├── onnx_test_softplus_example_test.go │ │ ├── onnx_test_softsign_example_test.go │ │ ├── onnx_test_thresholdedrelu_test.go │ │ ├── onnx_test_tile_precomputed_test.go │ │ ├── onnx_test_upsample_nearest_test.go │ │ ├── onnx_test_averagepool_2d_ceil_test.go │ │ ├── onnx_test_averagepool_2d_pads_test.go │ │ ├── onnx_test_batchnorm_epsilon_test.go │ │ ├── onnx_test_batchnorm_example_test.go │ │ ├── onnx_test_convtranspose_pad_test.go │ │ ├── onnx_test_convtranspose_pads_test.go │ │ ├── onnx_test_expand_dim_changed_test.go │ │ ├── onnx_test_eyelike_with_dtype_test.go │ │ ├── onnx_test_globalaveragepool_test.go │ │ ├── onnx_test_leakyrelu_default_test.go │ │ ├── onnx_test_leakyrelu_example_test.go │ │ ├── onnx_test_maxpool_1d_default_test.go │ │ ├── onnx_test_maxpool_2d_default_test.go │ │ ├── onnx_test_maxpool_2d_strides_test.go │ │ ├── onnx_test_maxpool_3d_default_test.go │ │ ├── onnx_test_onehot_without_axis_test.go │ │ ├── onnx_test_reciprocal_example_test.go │ │ ├── onnx_test_slice_default_axes_test.go │ │ ├── onnx_test_slice_default_steps_test.go │ │ ├── onnx_test_transpose_default_test.go │ │ └── onnx_test_cast_DOUBLE_to_FLOAT_test.go │ ├── backend_test.go │ ├── doc.go │ ├── test_test.go │ └── example_test.go ├── computation_backend.go └── README.md ├── internal ├── x │ ├── images │ │ └── README.md │ └── README.md ├── examples │ └── mnist │ │ ├── test_data_set_0 │ │ ├── input_0.pb │ │ └── output_0.pb │ │ ├── test_data_set_1 │ │ ├── input_0.pb │ │ └── output_0.pb │ │ ├── test_data_set_2 │ │ ├── input_0.pb │ │ └── output_0.pb │ │ ├── output_0.go │ │ └── test1_output0.go ├── readme │ └── doc.go └── tools │ └── dump │ └── main.go ├── misc └── viewer │ ├── README.md │ └── modelzoo.go ├── vignettes └── imgs │ ├── schema.png │ ├── Go-Logo_Blue.png │ └── ONNX_logo_main.png ├── doc └── introduction │ ├── assets │ ├── egg.png │ ├── why.png │ ├── agenda.png │ ├── darwin.png │ ├── demo.png │ ├── graph1.png │ ├── idea.png │ ├── lamp.jpg │ ├── lamp.png │ ├── loupe.png │ ├── test.jpg │ ├── test.png │ ├── tools.png │ ├── 8_28x28.jpg │ ├── 8_28x28.png │ ├── demo-fs8.png │ ├── software.png │ ├── demo-time.png │ ├── ml-trends.png │ ├── slide1-fs8.png │ ├── slide10-fs8.png │ ├── slide13-fs8.png │ ├── slide14-fs8.png │ ├── slide2-fs8.png │ ├── slide3-fs8.png │ ├── slide4-fs8.png │ ├── slide5-fs8.png │ ├── slide6-fs8.png │ ├── slide7-fs8.png │ ├── slide8-fs8.png │ ├── slide9-fs8.png │ ├── squelette.png │ ├── tensorflow.png │ ├── demo-time-fs8.png │ ├── graph1.dot │ ├── Gorgonia_Final.png │ ├── rgb-matrix-fs8.png │ ├── there_is-a-better_way.png │ └── equation1.html │ ├── static │ ├── favicon.ico │ └── notes.css │ ├── demos │ └── htdocs │ │ ├── emotion │ │ └── app.css │ │ └── mnist │ │ └── index.html │ ├── samples │ └── main.go │ ├── structure.go │ ├── README.md │ ├── classification.go │ └── process.go ├── examples ├── tiny_yolov2 │ └── data │ │ ├── dog.jpg │ │ └── dog_416.jpg └── model_zoo_executor │ └── Makefile ├── scripts ├── git-hooks.sh └── go.test.sh ├── CONTRIBUTING.md ├── RELNOTES.md ├── conv_example_test.go ├── tensor.go ├── .travis.yml ├── .gitmessage ├── .gitignore ├── example_test.go ├── node.go ├── .github ├── ISSUE_TEMPLATE │ └── feature_request.md └── FUNDING.yml ├── tensor_test.go └── backend.go /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-tactile -------------------------------------------------------------------------------- /backend/x/README.md: -------------------------------------------------------------------------------- 1 | Experimental backends 2 | -------------------------------------------------------------------------------- /internal/x/images/README.md: -------------------------------------------------------------------------------- 1 | Image processing utilities 2 | -------------------------------------------------------------------------------- /misc/viewer/README.md: -------------------------------------------------------------------------------- 1 | Load a graph and dump a DOT representation on stdout 2 | -------------------------------------------------------------------------------- /backend/simple/README.md: -------------------------------------------------------------------------------- 1 | Very simple backend implementation based on gonum's weighted graph builder 2 | -------------------------------------------------------------------------------- /backend/testbackend/testreport/README.md: -------------------------------------------------------------------------------- 1 | This directory contains some utilities to generate test reports 2 | -------------------------------------------------------------------------------- /vignettes/imgs/schema.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/vignettes/imgs/schema.png -------------------------------------------------------------------------------- /backend/testbackend/onnx/doc.go: -------------------------------------------------------------------------------- 1 | // Package onnxtest contains an export of the onnx test files 2 | package onnxtest 3 | -------------------------------------------------------------------------------- /doc/introduction/assets/egg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/egg.png -------------------------------------------------------------------------------- /doc/introduction/assets/why.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/why.png -------------------------------------------------------------------------------- /vignettes/imgs/Go-Logo_Blue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/vignettes/imgs/Go-Logo_Blue.png -------------------------------------------------------------------------------- /doc/introduction/assets/agenda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/agenda.png -------------------------------------------------------------------------------- /doc/introduction/assets/darwin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/darwin.png -------------------------------------------------------------------------------- /doc/introduction/assets/demo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/demo.png -------------------------------------------------------------------------------- /doc/introduction/assets/graph1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/graph1.png -------------------------------------------------------------------------------- /doc/introduction/assets/idea.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/idea.png -------------------------------------------------------------------------------- /doc/introduction/assets/lamp.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/lamp.jpg -------------------------------------------------------------------------------- /doc/introduction/assets/lamp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/lamp.png -------------------------------------------------------------------------------- /doc/introduction/assets/loupe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/loupe.png -------------------------------------------------------------------------------- /doc/introduction/assets/test.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/test.jpg -------------------------------------------------------------------------------- /doc/introduction/assets/test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/test.png -------------------------------------------------------------------------------- /doc/introduction/assets/tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/tools.png -------------------------------------------------------------------------------- /examples/tiny_yolov2/data/dog.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/examples/tiny_yolov2/data/dog.jpg -------------------------------------------------------------------------------- /vignettes/imgs/ONNX_logo_main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/vignettes/imgs/ONNX_logo_main.png -------------------------------------------------------------------------------- /doc/introduction/assets/8_28x28.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/8_28x28.jpg -------------------------------------------------------------------------------- /doc/introduction/assets/8_28x28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/8_28x28.png -------------------------------------------------------------------------------- /doc/introduction/assets/demo-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/demo-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/software.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/software.png -------------------------------------------------------------------------------- /doc/introduction/static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/static/favicon.ico -------------------------------------------------------------------------------- /internal/x/README.md: -------------------------------------------------------------------------------- 1 | This directory contains utilities that may eventually end in the master branch and in the exposed API 2 | -------------------------------------------------------------------------------- /backend/simple/doc.go: -------------------------------------------------------------------------------- 1 | // Package simple holds a very simple graph structure suitable to receive an onnx model 2 | package simple 3 | -------------------------------------------------------------------------------- /doc/introduction/assets/demo-time.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/demo-time.png -------------------------------------------------------------------------------- /doc/introduction/assets/ml-trends.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/ml-trends.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide1-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide1-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide10-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide10-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide13-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide13-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide14-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide14-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide2-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide2-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide3-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide3-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide4-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide4-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide5-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide5-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide6-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide6-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide7-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide7-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide8-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide8-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/slide9-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/slide9-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/squelette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/squelette.png -------------------------------------------------------------------------------- /doc/introduction/assets/tensorflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/tensorflow.png -------------------------------------------------------------------------------- /examples/tiny_yolov2/data/dog_416.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/examples/tiny_yolov2/data/dog_416.jpg -------------------------------------------------------------------------------- /doc/introduction/assets/demo-time-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/demo-time-fs8.png -------------------------------------------------------------------------------- /doc/introduction/assets/graph1.dot: -------------------------------------------------------------------------------- 1 | digraph G { 2 | σ -> add; 3 | add -> mul; 4 | add -> b; 5 | mul -> X; 6 | mul -> W; 7 | } 8 | -------------------------------------------------------------------------------- /doc/introduction/assets/Gorgonia_Final.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/Gorgonia_Final.png -------------------------------------------------------------------------------- /doc/introduction/assets/rgb-matrix-fs8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/rgb-matrix-fs8.png -------------------------------------------------------------------------------- /backend/x/gorgonnx/doc.go: -------------------------------------------------------------------------------- 1 | // Package gorgonnx creates a temporary graph that is compatible with backend.ComputationBackend. 2 | package gorgonnx 3 | -------------------------------------------------------------------------------- /backend/x/gorgonnx/example_operator.go: -------------------------------------------------------------------------------- 1 | package gorgonnx 2 | 3 | // ExampleOperator implementation of an operator 4 | func ExampleOperator() { 5 | } 6 | -------------------------------------------------------------------------------- /doc/introduction/assets/there_is-a-better_way.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/doc/introduction/assets/there_is-a-better_way.png -------------------------------------------------------------------------------- /examples/model_zoo_executor/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | 3 | all: $(wildcard models/*) 4 | 5 | models/%: .FORCE 6 | -MODELDIR=$@ go test 7 | 8 | .FORCE: 9 | -------------------------------------------------------------------------------- /internal/examples/mnist/test_data_set_0/input_0.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/internal/examples/mnist/test_data_set_0/input_0.pb -------------------------------------------------------------------------------- /internal/examples/mnist/test_data_set_0/output_0.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/internal/examples/mnist/test_data_set_0/output_0.pb -------------------------------------------------------------------------------- /internal/examples/mnist/test_data_set_1/input_0.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/internal/examples/mnist/test_data_set_1/input_0.pb -------------------------------------------------------------------------------- /internal/examples/mnist/test_data_set_1/output_0.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/internal/examples/mnist/test_data_set_1/output_0.pb -------------------------------------------------------------------------------- /internal/examples/mnist/test_data_set_2/input_0.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/internal/examples/mnist/test_data_set_2/input_0.pb -------------------------------------------------------------------------------- /internal/examples/mnist/test_data_set_2/output_0.pb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oramasearch/onnx-go/HEAD/internal/examples/mnist/test_data_set_2/output_0.pb -------------------------------------------------------------------------------- /doc/introduction/assets/equation1.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /backend/testbackend/backend_test.go: -------------------------------------------------------------------------------- 1 | package testbackend 2 | 3 | import "github.com/owulveryck/onnx-go/backend" 4 | 5 | var testBackend backend.ComputationBackend 6 | -------------------------------------------------------------------------------- /scripts/git-hooks.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -o errexit 3 | set -o nounset 4 | 5 | git config commit.template .gitmessage 6 | 7 | cp "${PROJECT_PATH}/scripts/pre-commit" "${PROJECT_PATH}/.git/hooks/" 8 | -------------------------------------------------------------------------------- /backend/x/gorgonnx/uniq.go: -------------------------------------------------------------------------------- 1 | package gorgonnx 2 | 3 | import "strconv" 4 | 5 | var uniq int 6 | 7 | func getUniqNodeName(prefix string) string { 8 | uniq++ 9 | return prefix + strconv.Itoa(uniq) 10 | } 11 | -------------------------------------------------------------------------------- /backend/testbackend/doc.go: -------------------------------------------------------------------------------- 1 | // Package testbackend provides a set of testing helper functions that test backend interface implementations. 2 | // The tests are extracted and converted from the onnx test set 3 | package testbackend 4 | -------------------------------------------------------------------------------- /internal/readme/doc.go: -------------------------------------------------------------------------------- 1 | // Package readme generates the readme 2 | 3 | // README.md is generated with the examples here by using embedmd. 4 | // For more details, see https://github.com/rakyll/embedmd. 5 | 6 | package readme 7 | -------------------------------------------------------------------------------- /backend/x/gorgonnx/errors.go: -------------------------------------------------------------------------------- 1 | package gorgonnx 2 | 3 | import "fmt" 4 | 5 | type errOp struct { 6 | op string 7 | err error 8 | } 9 | 10 | func (e *errOp) Error() string { 11 | return fmt.Sprintf("%s: %v", e.op, e.err) 12 | } 13 | -------------------------------------------------------------------------------- /backend/computation_backend.go: -------------------------------------------------------------------------------- 1 | package backend 2 | 3 | import "github.com/owulveryck/onnx-go" 4 | 5 | // ComputationBackend is a backend that can run the graph 6 | type ComputationBackend interface { 7 | onnx.Backend 8 | Run() error 9 | } 10 | -------------------------------------------------------------------------------- /internal/examples/mnist/output_0.go: -------------------------------------------------------------------------------- 1 | package mnist 2 | 3 | // GetOutput0 ... 4 | func GetOutput0() []byte { 5 | return []byte("\x08\x01\x08\n\x10\x01J(\xe3\xeasDU\xae\x1a\xc4\x8ct\xcdE\xda\x01'DWQe\xc4Y\xf4\xd0\xc4Q\x18\xf4\xc4\x123v\xc2NKB\xc4\x03\xf1\xb3\xc4") 6 | } 7 | -------------------------------------------------------------------------------- /internal/examples/mnist/test1_output0.go: -------------------------------------------------------------------------------- 1 | package mnist 2 | 3 | func getTest1Output0() []byte { 4 | return []byte("\x08\x01\x08\n\x10\x01J(\x1c\x8f\x9dE\x0c\x0e_\xc5\x01\xd3;\xc3\x81\xb9\xd2\xc4X\xea\x93\xc4y\x9b\x19\xc4\x84*_DH\xd4\xba\xc3\x93!\x91\xc39Z\xde\xc2") 5 | } 6 | -------------------------------------------------------------------------------- /doc/introduction/demos/htdocs/emotion/app.css: -------------------------------------------------------------------------------- 1 | *, *:before, *:after { 2 | box-sizing: border-box; 3 | } 4 | 5 | body { 6 | background-color: #FEFEFE; 7 | margin: 0; 8 | text-align: center; 9 | } 10 | 11 | #canvas { 12 | background-color: black; 13 | } 14 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | There is no real contribution guideline at the present time. This file may change a lot in the future. 2 | Feel free to submit PR also for this file ;) 3 | 4 | Before submitting a PR, please be sure to format your code. 5 | Please try to add a test file for every new feature. 6 | -------------------------------------------------------------------------------- /backend/testbackend/test_test.go: -------------------------------------------------------------------------------- 1 | package testbackend 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestRun(t *testing.T) { 8 | for _, tc := range GetOpTypeTests("Conv") { 9 | tc := tc // capture range variable 10 | t.Run(tc().GetInfo(), tc().RunTest(testBackend, true)) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /RELNOTES.md: -------------------------------------------------------------------------------- 1 | This is a new version of the API. 2 | The tweaked version of Gorgonia have been removed. It is now compatible with the master branch of Gorgonia. 3 | Some operators are not yet available though. 4 | 5 | A utility has been added in order to run models from the zoo. 6 | check the `examples` subdirectory. 7 | -------------------------------------------------------------------------------- /doc/introduction/samples/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func main() { 8 | // START OMIT 9 | n1, n2 := 0.1, 0.2 10 | n3 := 0.3 11 | n4 := n3 - n1 - n2 12 | if n4 == 0 { 13 | fmt.Println("n4 equals zero") 14 | } else { 15 | fmt.Println("n4 not equals zero") 16 | } 17 | // END OMIT 18 | } 19 | -------------------------------------------------------------------------------- /scripts/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /doc/introduction/structure.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | type results []result 4 | type result struct { 5 | Result string 6 | Weight float32 7 | } 8 | 9 | func (e results) Len() int { return len(e) } 10 | func (e results) Swap(i, j int) { e[i], e[j] = e[j], e[i] } 11 | func (e results) Less(i, j int) bool { return e[i].Weight < e[j].Weight } 12 | -------------------------------------------------------------------------------- /conv_example_test.go: -------------------------------------------------------------------------------- 1 | package onnx 2 | 3 | func testReadme() { 4 | convOperator := Operation{ 5 | Name: "Conv", 6 | Attributes: map[string]interface{}{ 7 | "auto_pad": "NOTSET", 8 | "dilations": []int64{1, 1}, 9 | "group": 1, 10 | "pads": []int64{1, 1}, 11 | "strides": []int64{1, 1}, 12 | }, 13 | } 14 | _ = convOperator 15 | } 16 | -------------------------------------------------------------------------------- /tensor.go: -------------------------------------------------------------------------------- 1 | package onnx 2 | 3 | import ( 4 | "github.com/owulveryck/onnx-go/internal/onnx/ir" 5 | "gorgonia.org/tensor" 6 | ) 7 | 8 | // NewTensor from onnx value 9 | func NewTensor(b []byte) (tensor.Tensor, error) { 10 | tp := new(ir.TensorProto) 11 | err := tp.XXX_Unmarshal(b) 12 | if err != nil { 13 | return nil, err 14 | } 15 | return tp.Tensor() 16 | } 17 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.13.x 5 | 6 | before_install: 7 | - make install 8 | 9 | script: 10 | - ./scripts/go.test.sh 11 | - make coverage 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | 16 | matrix: 17 | include: 18 | - os: linux 19 | arch: amd64 20 | - os: linux 21 | arch: arm64 22 | -------------------------------------------------------------------------------- /backend/x/gorgonnx/div_integer.go: -------------------------------------------------------------------------------- 1 | package gorgonnx 2 | 3 | func floorDivInt(a, b int) int { 4 | if a%b == 0 { 5 | return a / b 6 | } 7 | 8 | div := a / b 9 | if a < 0 && b > 0 || a > 0 && b < 0 { 10 | return div - 1 11 | } 12 | return div 13 | } 14 | func ceilDivInt(a, b int) int { 15 | if a%b == 0 { 16 | return a / b 17 | } 18 | return floorDivInt(a, b) + 1 19 | } 20 | -------------------------------------------------------------------------------- /.gitmessage: -------------------------------------------------------------------------------- 1 | # Hey there o/! 2 | # 3 | # Please use the following guidelines to format all your commit 4 | # messages: 5 | # 6 | (): 7 | 8 | 9 | 10 |