module OnnxChainer

Constants

VERSION

Public Class Methods

parse_file(onnx_path) click to toggle source
# File lib/onnx-chainer.rb, line 13
def self.parse_file(onnx_path)
  raise "File not found. #{onnx_path}" if onnx_path.nil? || !File.exists?(onnx_path)

  m = Onnx::ModelProto.decode(File.read(onnx_path))

  OnnxChainer::Graph.parse(m.graph)
end