import{s as U,o as W,n as j}from"../chunks/scheduler.5f3e6389.js";import{S as A,i as B,e as h,s,c as C,h as Y,a as $,d as n,b as l,f as E,g as b,j as X,k as F,l as D,m as o,n as k,t as H,o as L,p as M}from"../chunks/index.373ab25c.js";import{T as G}from"../chunks/Tip.3e202241.js";import{C as I,H as J}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.315d5a08.js";function K(w){let a,p='You can use <a href="https://netron.app/" rel="nofollow">Netron</a> to visualize any ONNX file on the Hugging Face Hub. Simply append append the file’s URL to <code>http://netron.app?url=</code> as in <a href="https://netron.app/?url=https://huggingface.co/cmarkea/distilcamembert-base-ner/blob/main/model.onnx" rel="nofollow">this example</a>';return{c(){a=h("p"),a.innerHTML=p},l(r){a=$(r,"P",{"data-svelte-h":!0}),X(a)!=="svelte-12h3atq"&&(a.innerHTML=p)},m(r,x){o(r,a,x)},p:j,d(r){r&&n(a)}}}function Q(w){let a,p,r,x,m,g,f,_,d,R="ONNX is an open standard that defines a common set of operators and a common file format to represent deep learning models in a wide variety of frameworks, including PyTorch and TensorFlow. When a model is exported to the ONNX format, these operators are used to construct a computational graph (often called an <em>intermediate representation</em>) that represents the flow of data through the neural network.",v,i,y,u,z="By exposing a graph with standardized operators and data types, ONNX makes it easy to switch between frameworks. For example, a model trained in PyTorch can be exported to ONNX format and then imported in TensorFlow (and vice versa).",T,c,S="Where ONNX really shines is when it is coupled with a dedicated accelerator like ONNX Runtime, or ORT for short. ORT provides tools to optimize the ONNX graph through techniques like operator fusion and constant folding, and defines an interface to execution providers that allow you to run the model on different types of hardware.",O,N,P;return m=new I({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),f=new J({props:{title:"ONNX 🤝 ONNX Runtime",local:"onnx--onnx-runtime",headingTag:"h1"}}),i=new G({props:{$$slots:{default:[K]},$$scope:{ctx:w}}}),{c(){a=h("meta"),p=s(),r=h("p"),x=s(),C(m.$$.fragment),g=s(),C(f.$$.fragment),_=s(),d=h("p"),d.innerHTML=R,v=s(),C(i.$$.fragment),y=s(),u=h("p"),u.textContent=z,T=s(),c=h("p"),c.textContent=S,O=s(),N=h("p"),this.h()},l(e){const t=Y("svelte-u9bgzb",document.head);a=$(t,"META",{name:!0,content:!0}),t.forEach(n),p=l(e),r=$(e,"P",{}),E(r).forEach(n),x=l(e),b(m.$$.fragment,e),g=l(e),b(f.$$.fragment,e),_=l(e),d=$(e,"P",{"data-svelte-h":!0}),X(d)!=="svelte-oa7an8"&&(d.innerHTML=R),v=l(e),b(i.$$.fragment,e),y=l(e),u=$(e,"P",{"data-svelte-h":!0}),X(u)!=="svelte-1inpqy9"&&(u.textContent=z),T=l(e),c=$(e,"P",{"data-svelte-h":!0}),X(c)!=="svelte-vyzu7u"&&(c.textContent=S),O=l(e),N=$(e,"P",{}),E(N).forEach(n),this.h()},h(){F(a,"name","hf:doc:metadata"),F(a,"content",V)},m(e,t){D(document.head,a),o(e,p,t),o(e,r,t),o(e,x,t),k(m,e,t),o(e,g,t),k(f,e,t),o(e,_,t),o(e,d,t),o(e,v,t),k(i,e,t),o(e,y,t),o(e,u,t),o(e,T,t),o(e,c,t),o(e,O,t),o(e,N,t),P=!0},p(e,[t]){const q={};t&2&&(q.$$scope={dirty:t,ctx:e}),i.$set(q)},i(e){P||(H(m.$$.fragment,e),H(f.$$.fragment,e),H(i.$$.fragment,e),P=!0)},o(e){L(m.$$.fragment,e),L(f.$$.fragment,e),L(i.$$.fragment,e),P=!1},d(e){e&&(n(p),n(r),n(x),n(g),n(_),n(d),n(v),n(y),n(u),n(T),n(c),n(O),n(N)),n(a),M(m,e),M(f,e),M(i,e)}}}const V='{"title":"ONNX 🤝 ONNX Runtime","local":"onnx--onnx-runtime","sections":[],"depth":1}';function Z(w){return W(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class oe extends A{constructor(a){super(),B(this,a,Z,Q,U,{})}}export{oe as component};
