Liking cljdoc? Tell your friends :D

easy-onnx.runtime


closeclj

(close session)

Close the Session. Same as (.close session).

Close the Session. Same as `(.close session)`.
raw docstring

componentclj

(component config)

Build an unstarted Session for use in a Stuart Sierra Component system. See create for accepted config keys.

Build an unstarted Session for use in a Stuart Sierra Component system.
See `create` for accepted config keys.
raw docstring

Configclj


createclj

(create config)

Build and start a Session. Use with with-open for one-shot use.

Required: :model-path - Path to an ONNX model file.

Optional session settings: :intra-op-num-threads - int. Threads used inside a single op. Defaults to all available cores; tune to your container's CPU limit to avoid throttling. :inter-op-num-threads - int. Threads used to parallelize across ops. :optimization-level - one of :none :basic :extended :all (default :all). :log-level - one of :verbose :info :warning :error :fatal.

Build and start a Session. Use with `with-open` for one-shot use.

Required:
  :model-path - Path to an ONNX model file.

Optional session settings:
  :intra-op-num-threads - int. Threads used inside a single op.
                          Defaults to all available cores; tune to your
                          container's CPU limit to avoid throttling.
  :inter-op-num-threads - int. Threads used to parallelize across ops.
  :optimization-level   - one of :none :basic :extended :all (default :all).
  :log-level            - one of :verbose :info :warning :error :fatal.
raw docstring

metadataclj

(metadata {:keys [session]})

Return the loaded ONNX model's metadata as a Clojure map.

Keys: :producer-name - tool that produced the model (e.g. "pytorch") :graph-name - graph name embedded in the model :graph-description - graph description (often empty) :domain - model domain (often empty) :description - model description (often empty) :version - model version. Long.MAX_VALUE means "unset". :custom-metadata - {String String} map of any custom tags the exporter attached. Empty for most exports.

Return the loaded ONNX model's metadata as a Clojure map.

Keys:
  :producer-name     - tool that produced the model (e.g. "pytorch")
  :graph-name        - graph name embedded in the model
  :graph-description - graph description (often empty)
  :domain            - model domain (often empty)
  :description       - model description (often empty)
  :version           - model version. Long.MAX_VALUE means "unset".
  :custom-metadata   - {String String} map of any custom tags the
                       exporter attached. Empty for most exports.
raw docstring

run-modelclj

(run-model {:keys [env session]} inputs)

Run inference on inputs, a map of {input-name -> Java array}. Returns {output-name -> raw value}. Manages OnnxTensor and Result lifecycles.

Run inference on `inputs`, a map of {input-name -> Java array}.
Returns {output-name -> raw value}. Manages OnnxTensor and Result lifecycles.
raw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close