chore: import upstream snapshot with attribution
cffconvert / validate (push) Has been skipped
License Check / license-check (push) Failing after 2s

This commit is contained in:
wehub-resource-sync
2026-07-13 12:14:16 +08:00
commit 8a852e4b4e
36502 changed files with 9277225 additions and 0 deletions
@@ -0,0 +1,118 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Classes</h1>
<p>The following classes are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC"></a>
<a name="//apple_ref/swift/Class/CoreMLDelegate" class="dashAnchor"></a>
<h3><a class="token" href="Classes/CoreMLDelegate.html">CoreMLDelegate</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A delegate that uses the <code>Core ML</code> framework for performing TensorFlow Lite graph operations.</p>
<div class="aside aside-important">
<p class="aside-title">Important</p>
This is an experimental interface that is subject to change.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">CoreMLDelegate</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Delegate.html">Delegate</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC"></a>
<a name="//apple_ref/swift/Class/Interpreter" class="dashAnchor"></a>
<h3><a class="token" href="Classes/Interpreter.html">Interpreter</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A TensorFlow Lite interpreter that performs inference from a given model.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Interpreter</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC"></a>
<a name="//apple_ref/swift/Class/MetalDelegate" class="dashAnchor"></a>
<h3><a class="token" href="Classes/MetalDelegate.html">MetalDelegate</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A delegate that uses the <code>Metal</code> framework for performing TensorFlow Lite graph operations with
GPU acceleration.</p>
<div class="aside aside-important">
<p class="aside-title">Important</p>
This is an experimental interface that is subject to change.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">MetalDelegate</span> <span class="p">:</span> <span class="kt"><a href="Protocols/Delegate.html">Delegate</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,193 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>CoreMLDelegate</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">CoreMLDelegate</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/Delegate.html">Delegate</a></span></code></pre>
</div>
</div>
<p>A delegate that uses the <code>Core ML</code> framework for performing TensorFlow Lite graph operations.</p>
<div class="aside aside-important">
<p class="aside-title">Important</p>
This is an experimental interface that is subject to change.
</div>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7optionsAC7OptionsVvp"></a>
<a name="//apple_ref/swift/Property/options" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC7optionsAC7OptionsVvp">options</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The configuration options for the <code>CoreMLDelegate</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Classes/CoreMLDelegate/Options.html">Options</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC9cDelegateXevp"></a>
<a name="//apple_ref/swift/Property/cDelegate" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC9cDelegateXevp">cDelegate</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">cDelegate</span><span class="p">:</span> <span class="kt">CDelegate</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7optionsACSgAC7OptionsV_tcfc"></a>
<a name="//apple_ref/swift/Method/init(options:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC7optionsACSgAC7OptionsV_tcfc">init(options:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance configured with the given <code><a href="../Classes/CoreMLDelegate.html#/s:19TensorFlowLiteSwift14CoreMLDelegateC7optionsAC7OptionsVvp">options</a></code>. Returns <code>nil</code> if the underlying
Core ML delegate could not be created because <code><a href="../Classes/CoreMLDelegate/Options.html#/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV14enabledDevicesAC07EnabledI0Ovp">Options.enabledDevices</a></code> was set to
<code>neuralEngine</code> but the device does not have the Neural Engine.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">?(</span><span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Classes/CoreMLDelegate/Options.html">Options</a></span> <span class="o">=</span> <span class="kt"><a href="../Classes/CoreMLDelegate/Options.html">Options</a></span><span class="p">())</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>options</em>
</code>
</td>
<td>
<div>
<p>Configurations for the delegate. The default is a new instance of
<code><a href="../Classes/CoreMLDelegate/Options.html">CoreMLDelegate.Options</a></code> with the default configuration values.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC14EnabledDevicesO"></a>
<a name="//apple_ref/swift/Enum/EnabledDevices" class="dashAnchor"></a>
<h3><a class="token" href="../Classes/CoreMLDelegate/EnabledDevices.html">EnabledDevices</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A type indicating which devices the Core ML delegate should be enabled for.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">EnabledDevices</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV"></a>
<a name="//apple_ref/swift/Struct/Options" class="dashAnchor"></a>
<h3><a class="token" href="../Classes/CoreMLDelegate/Options.html">Options</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>EnabledDevices</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">EnabledDevices</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>A type indicating which devices the Core ML delegate should be enabled for.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC14EnabledDevicesO12neuralEngineyA2EmF"></a>
<a name="//apple_ref/swift/Element/neuralEngine" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC14EnabledDevicesO12neuralEngineyA2EmF">neuralEngine</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Enables the delegate for devices with Neural Engine only.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">neuralEngine</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC14EnabledDevicesO3allyA2EmF"></a>
<a name="//apple_ref/swift/Element/all" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC14EnabledDevicesO3allyA2EmF">all</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Enables the delegate for all devices.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">all</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,173 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Options</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>Undocumented</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV14enabledDevicesAC07EnabledI0Ovp"></a>
<a name="//apple_ref/swift/Property/enabledDevices" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV14enabledDevicesAC07EnabledI0Ovp">enabledDevices</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A type indicating which devices the Core ML delegate should be enabled for. The default
value is <code>.neuralEngine</code> indicating that the delegate is enabled for Neural Engine devices
only.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">enabledDevices</span><span class="p">:</span> <span class="kt"><a href="../../Classes/CoreMLDelegate/EnabledDevices.html">EnabledDevices</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV13coreMLVersionSivp"></a>
<a name="//apple_ref/swift/Property/coreMLVersion" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV13coreMLVersionSivp">coreMLVersion</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Target Core ML version for the model conversion. When it&rsquo;s not set, Core ML version will
be set to highest available version for the platform.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">coreMLVersion</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV22maxDelegatedPartitionsSivp"></a>
<a name="//apple_ref/swift/Property/maxDelegatedPartitions" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV22maxDelegatedPartitionsSivp">maxDelegatedPartitions</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The maximum number of Core ML delegate partitions created. Each graph corresponds to one
delegated node subset in the TFLite model. The default value is <code>0</code> indicating that all
possible partitions are delegated.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">maxDelegatedPartitions</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV20minNodesPerPartitionSivp"></a>
<a name="//apple_ref/swift/Property/minNodesPerPartition" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsV20minNodesPerPartitionSivp">minNodesPerPartition</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The minimum number of nodes per partition to be delegated by the Core ML delegate. The
default value is <code>2</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">minNodesPerPartition</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsVAEycfc"></a>
<a name="//apple_ref/swift/Method/init()" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14CoreMLDelegateC7OptionsVAEycfc">init()</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance with the default values.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,554 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Interpreter</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">Interpreter</span></code></pre>
</div>
</div>
<p>A TensorFlow Lite interpreter that performs inference from a given model.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC7optionsAC7OptionsVSgvp"></a>
<a name="//apple_ref/swift/Property/options" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC7optionsAC7OptionsVSgvp">options</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The configuration options for the <code>Interpreter</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Classes/Interpreter/Options.html">Options</a></span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC9delegatesSayAA8Delegate_pGSgvp"></a>
<a name="//apple_ref/swift/Property/delegates" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC9delegatesSayAA8Delegate_pGSgvp">delegates</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>An <code>Array</code> of <code><a href="../Protocols/Delegate.html">Delegate</a></code>s for the <code>Interpreter</code> to use to perform graph operations.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">delegates</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/Delegate.html">Delegate</a></span><span class="p">]?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC05inputA5CountSivp"></a>
<a name="//apple_ref/swift/Property/inputTensorCount" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC05inputA5CountSivp">inputTensorCount</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The total number of input <code><a href="../Structs/Tensor.html">Tensor</a></code>s associated with the model.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">inputTensorCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC06outputA5CountSivp"></a>
<a name="//apple_ref/swift/Property/outputTensorCount" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC06outputA5CountSivp">outputTensorCount</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The total number of output <code><a href="../Structs/Tensor.html">Tensor</a></code>s associated with the model.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">outputTensorCount</span><span class="p">:</span> <span class="kt">Int</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC9modelPath7options9delegatesACSS_AC7OptionsVSgSayAA8Delegate_pGSgtKcfc"></a>
<a name="//apple_ref/swift/Method/init(modelPath:options:delegates:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC9modelPath7options9delegatesACSS_AC7OptionsVSgSayAA8Delegate_pGSgtKcfc">init(modelPath:options:delegates:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance with the given values.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
An error if the model could not be loaded or the interpreter could not be created.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">modelPath</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Classes/Interpreter/Options.html">Options</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">delegates</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/Delegate.html">Delegate</a></span><span class="p">]?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>modelPath</em>
</code>
</td>
<td>
<div>
<p>The local file path to a TensorFlow Lite model.</p>
</div>
</td>
</tr> <tr>
<td>
<code>
<em>options</em>
</code>
</td>
<td>
<div>
<p>Configurations for the <code>Interpreter</code>. The default is <code>nil</code> indicating that the
<code>Interpreter</code> will determine the configuration options.</p>
</div>
</td>
</tr> <tr>
<td>
<code>
<em>delegate</em>
</code>
</td>
<td>
<div>
<p><code>Array</code> of <code><a href="../Protocols/Delegate.html">Delegate</a></code>s for the <code>Interpreter</code> to use to perform graph operations.
The default is <code>nil</code>.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC6invokeyyKF"></a>
<a name="//apple_ref/swift/Method/invoke()" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC6invokeyyKF">invoke()</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Invokes the interpreter to perform inference from the loaded graph.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
An error if the model was not ready because the tensors were not allocated.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">invoke</span><span class="p">()</span> <span class="k">throws</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC5input2atAA0A0VSi_tKF"></a>
<a name="//apple_ref/swift/Method/input(at:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC5input2atAA0A0VSi_tKF">input(at:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns the input <code><a href="../Structs/Tensor.html">Tensor</a></code> at the given index.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
An error if the index is invalid or the tensors have not been allocated.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">input</span><span class="p">(</span><span class="n">at</span> <span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Structs/Tensor.html">Tensor</a></span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index for the input <code><a href="../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The input <code><a href="../Structs/Tensor.html">Tensor</a></code> at the given index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC6output2atAA0A0VSi_tKF"></a>
<a name="//apple_ref/swift/Method/output(at:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC6output2atAA0A0VSi_tKF">output(at:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Returns the output <code><a href="../Structs/Tensor.html">Tensor</a></code> at the given index.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
An error if the index is invalid, tensors haven&rsquo;t been allocated, or interpreter
has not been invoked for models that dynamically compute output tensors based on the
values of its input tensors.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">output</span><span class="p">(</span><span class="n">at</span> <span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Structs/Tensor.html">Tensor</a></span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index for the output <code><a href="../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The output <code><a href="../Structs/Tensor.html">Tensor</a></code> at the given index.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC11resizeInput2at2toySi_AA0A0V5ShapeVtKF"></a>
<a name="//apple_ref/swift/Method/resizeInput(at:to:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC11resizeInput2at2toySi_AA0A0V5ShapeVtKF">resizeInput(at:to:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Resizes the input <code><a href="../Structs/Tensor.html">Tensor</a></code> at the given index to the specified <code><a href="../Structs/Tensor/Shape.html">Tensor.Shape</a></code>.</p>
<div class="aside aside-note">
<p class="aside-title">Note</p>
After resizing an input tensor, the client <strong>must</strong> explicitly call
<code><a href="../Classes/Interpreter.html#/s:19TensorFlowLiteSwift11InterpreterC15allocateTensorsyyKF">allocateTensors()</a></code> before attempting to access the resized tensor data or invoking the
interpreter to perform inference.
</div><div class="aside aside-throws">
<p class="aside-title">Throws</p>
An error if the input tensor at the given index could not be resized.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">resizeInput</span><span class="p">(</span><span class="n">at</span> <span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="n">to</span> <span class="nv">shape</span><span class="p">:</span> <span class="kt"><a href="../Structs/Tensor.html">Tensor</a></span><span class="o">.</span><span class="kt">Shape</span><span class="p">)</span> <span class="k">throws</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index for the input <code><a href="../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
</td>
</tr> <tr>
<td>
<code>
<em>shape</em>
</code>
</td>
<td>
<div>
<p>The shape to resize the input <code><a href="../Structs/Tensor.html">Tensor</a></code> to.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC4copy_9toInputAtAA0A0V10Foundation4DataV_SitKF"></a>
<a name="//apple_ref/swift/Method/copy(_:toInputAt:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC4copy_9toInputAtAA0A0V10Foundation4DataV_SitKF">copy(_:toInputAt:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Copies the given data to the input <code><a href="../Structs/Tensor.html">Tensor</a></code> at the given index.</p>
<div class="aside aside-throws">
<p class="aside-title">Throws</p>
An error if the <code>data.count</code> does not match the input tensor&rsquo;s <code>data.count</code> or if
the given index is invalid.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">@discardableResult</span>
<span class="kd">public</span> <span class="kd">func</span> <span class="nf">copy</span><span class="p">(</span><span class="n">_</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span><span class="p">,</span> <span class="n">toInputAt</span> <span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="k">throws</span> <span class="o">-&gt;</span> <span class="kt"><a href="../Structs/Tensor.html">Tensor</a></span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>data</em>
</code>
</td>
<td>
<div>
<p>The data to be copied to the input <code><a href="../Structs/Tensor.html">Tensor</a></code>&lsquo;s data buffer.</p>
</div>
</td>
</tr> <tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The index for the input <code><a href="../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The input <code><a href="../Structs/Tensor.html">Tensor</a></code> with the copied data.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC15allocateTensorsyyKF"></a>
<a name="//apple_ref/swift/Method/allocateTensors()" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC15allocateTensorsyyKF">allocateTensors()</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Allocates memory for all input <code><a href="../Structs/Tensor.html">Tensor</a></code>s based on their <code><a href="../Structs/Tensor/Shape.html">Tensor.Shape</a></code>s.</p>
<div class="aside aside-note">
<p class="aside-title">Note</p>
This is a relatively expensive operation and should only be called after creating the
interpreter and resizing any input tensors.
</div><div class="aside aside-throws">
<p class="aside-title">Throws</p>
An error if memory could not be allocated for the input tensors.
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">allocateTensors</span><span class="p">()</span> <span class="k">throws</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC7OptionsV"></a>
<a name="//apple_ref/swift/Struct/Options" class="dashAnchor"></a>
<h3><a class="token" href="../Classes/Interpreter/Options.html">Options</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Options for configuring the <code><a href="../Classes/Interpreter.html">Interpreter</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,140 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Options</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>Options for configuring the <code><a href="../../Classes/Interpreter.html">Interpreter</a></code>.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC7OptionsV11threadCountSiSgvp"></a>
<a name="//apple_ref/swift/Property/threadCount" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC7OptionsV11threadCountSiSgvp">threadCount</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The maximum number of CPU threads that the interpreter should run on. The default is <code>nil</code>
indicating that the <code><a href="../../Classes/Interpreter.html">Interpreter</a></code> will decide the number of threads to use.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">threadCount</span><span class="p">:</span> <span class="kt">Int</span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC7OptionsV16isXNNPackEnabledSbvp"></a>
<a name="//apple_ref/swift/Property/isXNNPackEnabled" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC7OptionsV16isXNNPackEnabledSbvp">isXNNPackEnabled</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Indicates whether an optimized set of floating point CPU kernels, provided by XNNPACK, is
enabled.</p>
<div class="aside aside-experiment">
<p class="aside-title">Experiment</p>
<p>Enabling this flag will enable use of a new, highly optimized set of CPU kernels provided
via the XNNPACK delegate. Currently, this is restricted to a subset of floating point
operations. Eventually, we plan to enable this by default, as it can provide significant
performance benefits for many classes of floating point models. See
<a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/xnnpack/README.md">https://github.com/tensorflow/tensorflow/blob/master/tensorflow/lite/delegates/xnnpack/README.md</a>
for more details.</p>
</div><div class="aside aside-important">
<p class="aside-title">Important</p>
<p>Things to keep in mind when enabling this flag:</p>
<ul>
<li>Startup time and resize time may increase.</li>
<li>Baseline memory consumption may increase.</li>
<li>Compatibility with other delegates (e.g., GPU) has not been fully validated.</li>
<li>Quantized models will not see any benefit.</li>
</ul>
</div><div class="aside aside-warning">
<p class="aside-title">Warning</p>
<p>This is an experimental interface that is subject to change.</p>
</div>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isXNNPackEnabled</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift11InterpreterC7OptionsVAEycfc"></a>
<a name="//apple_ref/swift/Method/init()" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift11InterpreterC7OptionsVAEycfc">init()</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance with the default values.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,165 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>MetalDelegate</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">final</span> <span class="kd">class</span> <span class="kt">MetalDelegate</span> <span class="p">:</span> <span class="kt"><a href="../Protocols/Delegate.html">Delegate</a></span></code></pre>
</div>
</div>
<p>A delegate that uses the <code>Metal</code> framework for performing TensorFlow Lite graph operations with
GPU acceleration.</p>
<div class="aside aside-important">
<p class="aside-title">Important</p>
This is an experimental interface that is subject to change.
</div>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7optionsAC7OptionsVvp"></a>
<a name="//apple_ref/swift/Property/options" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC7optionsAC7OptionsVvp">options</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The configuration options for the <code>MetalDelegate</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Classes/MetalDelegate/Options.html">Options</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC01cF0Xevp"></a>
<a name="//apple_ref/swift/Property/cDelegate" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC01cF0Xevp">cDelegate</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">cDelegate</span><span class="p">:</span> <span class="kt">CDelegate</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7optionsA2C7OptionsV_tcfc"></a>
<a name="//apple_ref/swift/Method/init(options:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC7optionsA2C7OptionsV_tcfc">init(options:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance configured with the given <code><a href="../Classes/MetalDelegate.html#/s:19TensorFlowLiteSwift13MetalDelegateC7optionsAC7OptionsVvp">options</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Classes/MetalDelegate/Options.html">Options</a></span> <span class="o">=</span> <span class="kt"><a href="../Classes/MetalDelegate/Options.html">Options</a></span><span class="p">())</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>options</em>
</code>
</td>
<td>
<div>
<p>Configurations for the delegate. The default is a new instance of
<code><a href="../Classes/MetalDelegate/Options.html">MetalDelegate.Options</a></code> with the default configuration values.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV"></a>
<a name="//apple_ref/swift/Struct/Options" class="dashAnchor"></a>
<h3><a class="token" href="../Classes/MetalDelegate/Options.html">Options</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Options for configuring the <code><a href="../Classes/MetalDelegate.html">MetalDelegate</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,170 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Options</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Options</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>Options for configuring the <code><a href="../../Classes/MetalDelegate.html">MetalDelegate</a></code>.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV22isPrecisionLossAllowedSbvp"></a>
<a name="//apple_ref/swift/Property/isPrecisionLossAllowed" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV22isPrecisionLossAllowedSbvp">isPrecisionLossAllowed</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Indicates whether the GPU delegate allows precision loss, such as allowing <code>Float16</code>
precision for a <code>Float32</code> computation. The default is <code>false</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isPrecisionLossAllowed</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV19allowsPrecisionLossSbvp"></a>
<a name="//apple_ref/swift/Property/allowsPrecisionLoss" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV19allowsPrecisionLossSbvp">allowsPrecisionLoss</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">allowsPrecisionLoss</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV8waitTypeAA010ThreadWaitI0Ovp"></a>
<a name="//apple_ref/swift/Property/waitType" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV8waitTypeAA010ThreadWaitI0Ovp">waitType</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A type indicating how the current thread should wait for work on the GPU to complete. The
default is <code>passive</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">waitType</span><span class="p">:</span> <span class="kt"><a href="../../Enums/ThreadWaitType.html">ThreadWaitType</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV21isQuantizationEnabledSbvp"></a>
<a name="//apple_ref/swift/Property/isQuantizationEnabled" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsV21isQuantizationEnabledSbvp">isQuantizationEnabled</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Indicates whether the GPU delegate allows execution of an 8-bit quantized model. The default
is <code>true</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">isQuantizationEnabled</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsVAEycfc"></a>
<a name="//apple_ref/swift/Method/init()" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift13MetalDelegateC7OptionsVAEycfc">init()</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance with the default values.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">()</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,109 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Enumerations</h1>
<p>The following enumerations are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO"></a>
<a name="//apple_ref/swift/Enum/InterpreterError" class="dashAnchor"></a>
<h3><a class="token" href="Enums/InterpreterError.html">InterpreterError</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Errors thrown by the TensorFlow Lite <code><a href="Classes/Interpreter.html">Interpreter</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">InterpreterError</span> <span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">InterpreterError</span><span class="p">:</span> <span class="kt">LocalizedError</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">InterpreterError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14ThreadWaitTypeO"></a>
<a name="//apple_ref/swift/Enum/ThreadWaitType" class="dashAnchor"></a>
<h3><a class="token" href="Enums/ThreadWaitType.html">ThreadWaitType</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A type indicating how the current thread should wait for work scheduled on the GPU to complete.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">ThreadWaitType</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift7RuntimeO"></a>
<a name="//apple_ref/swift/Enum/Runtime" class="dashAnchor"></a>
<h3><a class="token" href="Enums/Runtime.html">Runtime</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>TensorFlow Lite runtime values.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Runtime</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,385 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>InterpreterError</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">InterpreterError</span> <span class="p">:</span> <span class="kt">Error</span><span class="p">,</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">InterpreterError</span><span class="p">:</span> <span class="kt">LocalizedError</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">InterpreterError</span><span class="p">:</span> <span class="kt">CustomStringConvertible</span></code></pre>
</div>
</div>
<p>Errors thrown by the TensorFlow Lite <code><a href="../Classes/Interpreter.html">Interpreter</a></code>.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO07invalidA5IndexyACSi_SitcACmF"></a>
<a name="//apple_ref/swift/Element/invalidTensorIndex(index:maxIndex:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO07invalidA5IndexyACSi_SitcACmF">invalidTensorIndex(index:maxIndex:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidTensorIndex</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">maxIndex</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO07invalidA9DataCountyACSi_SitcACmF"></a>
<a name="//apple_ref/swift/Element/invalidTensorDataCount(provided:required:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO07invalidA9DataCountyACSi_SitcACmF">invalidTensorDataCount(provided:required:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">invalidTensorDataCount</span><span class="p">(</span><span class="nv">provided</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">required</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO07invalidA8DataTypeyA2CmF"></a>
<a name="//apple_ref/swift/Element/invalidTensorDataType" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO07invalidA8DataTypeyA2CmF">invalidTensorDataType</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">invalidTensorDataType</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO17failedToLoadModelyA2CmF"></a>
<a name="//apple_ref/swift/Element/failedToLoadModel" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO17failedToLoadModelyA2CmF">failedToLoadModel</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">failedToLoadModel</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO014failedToCreateE0yA2CmF"></a>
<a name="//apple_ref/swift/Element/failedToCreateInterpreter" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO014failedToCreateE0yA2CmF">failedToCreateInterpreter</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">failedToCreateInterpreter</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO019failedToResizeInputA0yACSi_tcACmF"></a>
<a name="//apple_ref/swift/Element/failedToResizeInputTensor(index:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO019failedToResizeInputA0yACSi_tcACmF">failedToResizeInputTensor(index:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">failedToResizeInputTensor</span><span class="p">(</span><span class="nv">index</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO016failedToCopyDatah5InputA0yA2CmF"></a>
<a name="//apple_ref/swift/Element/failedToCopyDataToInputTensor" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO016failedToCopyDatah5InputA0yA2CmF">failedToCopyDataToInputTensor</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">failedToCopyDataToInputTensor</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO23failedToAllocateTensorsyA2CmF"></a>
<a name="//apple_ref/swift/Element/failedToAllocateTensors" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO23failedToAllocateTensorsyA2CmF">failedToAllocateTensors</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">failedToAllocateTensors</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO23allocateTensorsRequiredyA2CmF"></a>
<a name="//apple_ref/swift/Element/allocateTensorsRequired" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO23allocateTensorsRequiredyA2CmF">allocateTensorsRequired</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">allocateTensorsRequired</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO06invokeE8RequiredyA2CmF"></a>
<a name="//apple_ref/swift/Element/invokeInterpreterRequired" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO06invokeE8RequiredyA2CmF">invokeInterpreterRequired</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">invokeInterpreterRequired</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO06tensorbcF0yACSScACmF"></a>
<a name="//apple_ref/swift/Element/tensorFlowLiteError(_:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO06tensorbcF0yACSScACmF">tensorFlowLiteError(_:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Undocumented</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="nf">tensorFlowLiteError</span><span class="p">(</span><span class="kt">String</span><span class="p">)</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO16errorDescriptionSSSgvp"></a>
<a name="//apple_ref/swift/Property/errorDescription" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO16errorDescriptionSSSgvp">errorDescription</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A localized description of the interpreter error.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">errorDescription</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift16InterpreterErrorO11descriptionSSvp"></a>
<a name="//apple_ref/swift/Property/description" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift16InterpreterErrorO11descriptionSSvp">description</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A textual representation of the TensorFlow Lite interpreter error.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">description</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Runtime</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">Runtime</span></code></pre>
</div>
</div>
<p>TensorFlow Lite runtime values.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift7RuntimeO7versionSSvpZ"></a>
<a name="//apple_ref/swift/Variable/version" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift7RuntimeO7versionSSvpZ">version</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A string describing the semantic versioning information for the runtime. Is an empty string if
the version could not be determined.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="k">var</span> <span class="nv">version</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,142 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>ThreadWaitType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">ThreadWaitType</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>A type indicating how the current thread should wait for work scheduled on the GPU to complete.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14ThreadWaitTypeO4noneyA2CmF"></a>
<a name="//apple_ref/swift/Element/none" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14ThreadWaitTypeO4noneyA2CmF">none</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The thread does not wait for the work to complete. Useful when the output of the work is used
with the GPU pipeline.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="k">none</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14ThreadWaitTypeO7passiveyA2CmF"></a>
<a name="//apple_ref/swift/Element/passive" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14ThreadWaitTypeO7passiveyA2CmF">passive</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The thread waits until the work is complete.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">passive</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14ThreadWaitTypeO6activeyA2CmF"></a>
<a name="//apple_ref/swift/Element/active" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14ThreadWaitTypeO6activeyA2CmF">active</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The thread waits for the work to complete with minimal latency, which may require additional
CPU resources.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">active</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift14ThreadWaitTypeO10aggressiveyA2CmF"></a>
<a name="//apple_ref/swift/Element/aggressive" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift14ThreadWaitTypeO10aggressiveyA2CmF">aggressive</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The thread waits for the work while trying to prevent the GPU from going into sleep mode.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">aggressive</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,53 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Protocols</h1>
<p>The following protocols are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift8DelegateP"></a>
<a name="//apple_ref/swift/Protocol/Delegate" class="dashAnchor"></a>
<h3><a class="token" href="Protocols/Delegate.html">Delegate</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A delegate that the <code><a href="Classes/Interpreter.html">Interpreter</a></code> uses to perform TensorFlow Lite model computations.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Delegate</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,86 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Delegate</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">protocol</span> <span class="kt">Delegate</span> <span class="p">:</span> <span class="kt">AnyObject</span></code></pre>
</div>
</div>
<p>A delegate that the <code><a href="../Classes/Interpreter.html">Interpreter</a></code> uses to perform TensorFlow Lite model computations.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift8DelegateP9CDelegatea"></a>
<a name="//apple_ref/swift/Alias/CDelegate" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift8DelegateP9CDelegatea">CDelegate</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The <code>TfLiteDelegate</code> C pointer type.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">typealias</span> <span class="kt">CDelegate</span> <span class="o">=</span> <span class="kt">UnsafeMutablePointer</span><span class="o">&lt;</span><span class="kt">TfLiteDelegate</span><span class="o">&gt;</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift8DelegateP01cE0Xevp"></a>
<a name="//apple_ref/swift/Property/cDelegate" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift8DelegateP01cE0Xevp">cDelegate</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The delegate that performs model computations.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">var</span> <span class="nv">cDelegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/Delegate.html#/s:19TensorFlowLiteSwift8DelegateP9CDelegatea">CDelegate</a></span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,82 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Structures</h1>
<p>The following structures are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift22QuantizationParametersV"></a>
<a name="//apple_ref/swift/Struct/QuantizationParameters" class="dashAnchor"></a>
<h3><a class="token" href="Structs/QuantizationParameters.html">QuantizationParameters</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Parameters that determine the mapping of quantized values to real values. Quantized values can
be mapped to float values using the following conversion:
<code>realValue = scale * (quantizedValue - zeroPoint)</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">QuantizationParameters</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V"></a>
<a name="//apple_ref/swift/Struct/Tensor" class="dashAnchor"></a>
<h3><a class="token" href="Structs/Tensor.html">Tensor</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>An input or output tensor in a TensorFlow Lite graph.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Tensor</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,92 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>QuantizationParameters</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">QuantizationParameters</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>Parameters that determine the mapping of quantized values to real values. Quantized values can
be mapped to float values using the following conversion:
<code>realValue = scale * (quantizedValue - zeroPoint)</code>.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift22QuantizationParametersV5scaleSfvp"></a>
<a name="//apple_ref/swift/Property/scale" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift22QuantizationParametersV5scaleSfvp">scale</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The difference between real values corresponding to consecutive quantized values differing by</p>
<ol>
<li>For example, the range of quantized values for <code>UInt8</code> data type is [0, 255].</li>
</ol>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">scale</span><span class="p">:</span> <span class="kt">Float</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift22QuantizationParametersV9zeroPointSivp"></a>
<a name="//apple_ref/swift/Property/zeroPoint" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift22QuantizationParametersV9zeroPointSivp">zeroPoint</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The quantized value that corresponds to the real 0 value.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">zeroPoint</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,222 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Tensor</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Tensor</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>An input or output tensor in a TensorFlow Lite graph.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V4nameSSvp"></a>
<a name="//apple_ref/swift/Property/name" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V4nameSSvp">name</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The name of the <code>Tensor</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8dataTypeAC04DataF0Ovp"></a>
<a name="//apple_ref/swift/Property/dataType" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8dataTypeAC04DataF0Ovp">dataType</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The data type of the <code>Tensor</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">dataType</span><span class="p">:</span> <span class="kt"><a href="../Structs/Tensor/DataType.html">DataType</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V5shapeAC5ShapeVvp"></a>
<a name="//apple_ref/swift/Property/shape" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5shapeAC5ShapeVvp">shape</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The shape of the <code>Tensor</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">shape</span><span class="p">:</span> <span class="kt"><a href="../Structs/Tensor/Shape.html">Shape</a></span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V4data10Foundation4DataVvp"></a>
<a name="//apple_ref/swift/Property/data" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V4data10Foundation4DataVvp">data</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The data in the input or output <code>Tensor</code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">data</span><span class="p">:</span> <span class="kt">Data</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V22quantizationParametersAA012QuantizationF0VSgvp"></a>
<a name="//apple_ref/swift/Property/quantizationParameters" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V22quantizationParametersAA012QuantizationF0VSgvp">quantizationParameters</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The quantization parameters for the <code>Tensor</code> if using a quantized model.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">quantizationParameters</span><span class="p">:</span> <span class="kt"><a href="../Structs/QuantizationParameters.html">QuantizationParameters</a></span><span class="p">?</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO"></a>
<a name="//apple_ref/swift/Enum/DataType" class="dashAnchor"></a>
<h3><a class="token" href="../Structs/Tensor/DataType.html">DataType</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The supported <code><a href="../Structs/Tensor.html">Tensor</a></code> data types.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">DataType</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V5ShapeV"></a>
<a name="//apple_ref/swift/Struct/Shape" class="dashAnchor"></a>
<h3><a class="token" href="../Structs/Tensor/Shape.html">Shape</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The shape of a <code><a href="../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Shape</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../Structs/Tensor.html">Tensor</a></span><span class="o">.</span><span class="kt">Shape</span><span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,248 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>DataType</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">DataType</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
</div>
</div>
<p>The supported <code><a href="../../Structs/Tensor.html">Tensor</a></code> data types.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO4boolyA2EmF"></a>
<a name="//apple_ref/swift/Element/bool" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO4boolyA2EmF">bool</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A boolean.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">bool</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO5uInt8yA2EmF"></a>
<a name="//apple_ref/swift/Element/uInt8" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO5uInt8yA2EmF">uInt8</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>An 8-bit unsigned integer.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">uInt8</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO5int16yA2EmF"></a>
<a name="//apple_ref/swift/Element/int16" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO5int16yA2EmF">int16</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A 16-bit signed integer.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">int16</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO5int32yA2EmF"></a>
<a name="//apple_ref/swift/Element/int32" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO5int32yA2EmF">int32</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A 32-bit signed integer.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">int32</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO5int64yA2EmF"></a>
<a name="//apple_ref/swift/Element/int64" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO5int64yA2EmF">int64</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A 64-bit signed integer.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">int64</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO7float16yA2EmF"></a>
<a name="//apple_ref/swift/Element/float16" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO7float16yA2EmF">float16</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A 16-bit half precision floating point.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">float16</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO7float32yA2EmF"></a>
<a name="//apple_ref/swift/Element/float32" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO7float32yA2EmF">float32</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A 32-bit single precision floating point.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">float32</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V8DataTypeO7float64yA2EmF"></a>
<a name="//apple_ref/swift/Element/float64" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V8DataTypeO7float64yA2EmF">float64</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A 64-bit double precision floating point.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="k">case</span> <span class="n">float64</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,222 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="../../css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Shape</h1>
<div class="declaration">
<div class="language">
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">struct</span> <span class="kt">Shape</span> <span class="p">:</span> <span class="kt">Equatable</span><span class="p">,</span> <span class="kt">Hashable</span></code></pre>
<pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt"><a href="../../Structs/Tensor.html">Tensor</a></span><span class="o">.</span><span class="kt">Shape</span><span class="p">:</span> <span class="kt">ExpressibleByArrayLiteral</span></code></pre>
</div>
</div>
<p>The shape of a <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V5ShapeV4rankSivp"></a>
<a name="//apple_ref/swift/Property/rank" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeV4rankSivp">rank</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>The number of dimensions of the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">rank</span><span class="p">:</span> <span class="kt">Int</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V5ShapeV10dimensionsSaySiGvp"></a>
<a name="//apple_ref/swift/Property/dimensions" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeV10dimensionsSaySiGvp">dimensions</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>An array of dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">dimensions</span><span class="p">:</span> <span class="p">[</span><span class="kt">Int</span><span class="p">]</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V5ShapeVyAESaySiGcfc"></a>
<a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeVyAESaySiGcfc">init(_:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance with the given array of dimensions.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">dimensions</span><span class="p">:</span> <span class="p">[</span><span class="kt">Int</span><span class="p">])</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>dimensions</em>
</code>
</td>
<td>
<div>
<p>Dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V5ShapeVyAESid_tcfc"></a>
<a name="//apple_ref/swift/Method/init(_:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeVyAESid_tcfc">init(_:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance with the given elements representing the dimensions.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="n">_</span> <span class="nv">elements</span><span class="p">:</span> <span class="kt">Int</span><span class="o">...</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>elements</em>
</code>
</td>
<td>
<div>
<p>Dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift0A0V5ShapeV12arrayLiteralAESid_tcfc"></a>
<a name="//apple_ref/swift/Method/init(arrayLiteral:)" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift0A0V5ShapeV12arrayLiteralAESid_tcfc">init(arrayLiteral:)</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Creates a new instance with the given array literal representing the dimensions.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">arrayLiteral</span><span class="p">:</span> <span class="kt">Int</span><span class="o">...</span><span class="p">)</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>arrayLiteral</em>
</code>
</td>
<td>
<div>
<p>Dimensions for the <code><a href="../../Structs/Tensor.html">Tensor</a></code>.</p>
</div>
</td>
</tr> </tbody>
</table>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html devsite>
<head>
<title>TensorFlowLiteSwift Framework Reference</title>
<link rel="stylesheet" href="css/jazzy.css" />
<meta charset='utf-8'>
</head>
<body>
<div class="content-wrapper">
<article class="main-content">
<section>
<section class="section">
<h1>Type Aliases</h1>
<p>The following type aliases are available globally.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:19TensorFlowLiteSwift18InterpreterOptionsa"></a>
<a name="//apple_ref/swift/Alias/InterpreterOptions" class="dashAnchor"></a>
<h3><a class="token" href="#/s:19TensorFlowLiteSwift18InterpreterOptionsa">InterpreterOptions</a></h3>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>A type alias for <code><a href="Classes/Interpreter/Options.html">Interpreter.Options</a></code> to support backwards compatibility with the deprecated
<code>InterpreterOptions</code> struct.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="objc">
<p class="aside-title-objc">Swift</p>
<pre class="highlight swift"><code><span class="kd">@available</span><span class="p">(</span><span class="o">*</span><span class="p">,</span> <span class="n">deprecated</span><span class="p">,</span> <span class="nv">renamed</span><span class="p">:</span> <span class="s">"Interpreter.Options"</span><span class="p">)</span>
<span class="kd">public</span> <span class="kd">typealias</span> <span class="kt">InterpreterOptions</span> <span class="o">=</span> <span class="kt"><a href="Classes/Interpreter.html">Interpreter</a></span><span class="o">.</span><span class="kt">Options</span></code></pre>
</div>
</div>
</section>
</div>
</li>
</ul>
</div> </section>
</section>
</article>
</div>
</body>
</html>
@@ -0,0 +1,65 @@
# Copyright 2026 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ==============================================================================
toc:
- title: TensorFlowLiteSwift
section:
- title: Classes
path: /lite/api_docs/swift/Classes.html
section:
- title: CoreMLDelegate
path: /lite/api_docs/swift/Classes/CoreMLDelegate.html
- title: EnabledDevices
path: /lite/api_docs/swift/Classes/CoreMLDelegate/EnabledDevices.html
- title: Options
path: /lite/api_docs/swift/Classes/CoreMLDelegate/Options.html
- title: Interpreter
path: /lite/api_docs/swift/Classes/Interpreter.html
- title: Options
path: /lite/api_docs/swift/Classes/Interpreter/Options.html
- title: MetalDelegate
path: /lite/api_docs/swift/Classes/MetalDelegate.html
- title: Options
path: /lite/api_docs/swift/Classes/MetalDelegate/Options.html
- title: Enumerations
path: /lite/api_docs/swift/Enums.html
section:
- title: InterpreterError
path: /lite/api_docs/swift/Enums/InterpreterError.html
- title: Runtime
path: /lite/api_docs/swift/Enums/Runtime.html
- title: ThreadWaitType
path: /lite/api_docs/swift/Enums/ThreadWaitType.html
- title: Protocols
path: /lite/api_docs/swift/Protocols.html
section:
- title: Delegate
path: /lite/api_docs/swift/Protocols/Delegate.html
- title: Structures
path: /lite/api_docs/swift/Structs.html
section:
- title: QuantizationParameters
path: /lite/api_docs/swift/Structs/QuantizationParameters.html
- title: Tensor
path: /lite/api_docs/swift/Structs/Tensor.html
- title: DataType
path: /lite/api_docs/swift/Structs/Tensor/DataType.html
- title: Shape
path: /lite/api_docs/swift/Structs/Tensor/Shape.html
- title: Type Aliases
path: /lite/api_docs/swift/Typealiases.html
section:
- title: InterpreterOptions
path: /lite/api_docs/swift/Typealiases.html#/s:19TensorFlowLiteSwift18InterpreterOptionsa
@@ -0,0 +1,28 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="20">
<linearGradient id="b" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<clipPath id="a">
<rect width="128" height="20" rx="3" fill="#fff"/>
</clipPath>
<g clip-path="url(#a)">
<path fill="#555" d="M0 0h93v20H0z"/>
<path fill="#a4a61d" d="M93 0h35v20H93z"/>
<path fill="url(#b)" d="M0 0h128v20H0z"/>
</g>
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="110">
<text x="475" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="475" y="140" transform="scale(.1)" textLength="830">
documentation
</text>
<text x="1095" y="150" fill="#010101" fill-opacity=".3" transform="scale(.1)" textLength="250">
84%
</text>
<text x="1095" y="140" transform="scale(.1)" textLength="250">
84%
</text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,64 @@
/* Copyright 2024 The TensorFlow Authors. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
.task-group ul {
padding: 0;
}
li.item {
list-style: none;
}
li.item > div:first-child > code {
background: 0;
border-bottom: 1px solid #ebebeb;
display: block;
font: 400 24px/32px Roboto,sans-serif;
letter-spacing: -.01em;
margin: 40px 0 20px;
padding: 0 0 3px;
}
.swift {
padding: 6px 12px;
margin: 12px 0;
border-left: 5px solid rgba(205,233,244,1);
overflow-y: hidden;
}
.aside-title-swift {
font-size: 11px;
letter-spacing: 2px;
text-transform: uppercase;
padding-bottom: 0;
margin: 0;
color: #4b8afb;
}
.objc {
padding: 6px 12px;
margin: 12px 0;
border-left: 5px solid rgba(0, 155, 51, 0.2);
overflow-y: hidden;
}
.aside-title-objc {
font-size: 11px;
letter-spacing: 2px;
text-transform: uppercase;
padding-bottom: 0;
margin: 0;
color: #009b33;
}
File diff suppressed because one or more lines are too long