@modelx/modelx
Version:
Construct AI & ML models with JSON using Typescript & Tensorflow
719 lines • 61.2 kB
HTML
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>TextEmbedding | @modelx/data</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">@modelx/data</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/_node_modules__modelx_model_src_text_embedding_.html">"node_modules/@modelx/model/src/text_embedding"</a>
</li>
<li>
<a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html">TextEmbedding</a>
</li>
</ul>
<h1>Class TextEmbedding</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Text Embedding with Tensorflow Universal Sentence Encoder (USE)</p>
</div>
<dl class="tsd-comment-tags">
<dt>implements</dt>
<dd><p>{TensorScriptModelInterface}</p>
</dd>
</dl>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html" class="tsd-signature-type">TensorScriptModelInterface</a>
<ul class="tsd-hierarchy">
<li>
<span class="target">TextEmbedding</span>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-inherited">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#compiled" class="tsd-kind-icon">compiled</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#getinputshape" class="tsd-kind-icon">get<wbr>Input<wbr>Shape</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#gettimeseriesshape" class="tsd-kind-icon">get<wbr>Timeseries<wbr>Shape</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#layers" class="tsd-kind-icon">layers</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#model" class="tsd-kind-icon">model</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#reshape" class="tsd-kind-icon">reshape</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#settings" class="tsd-kind-icon">settings</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#tf" class="tsd-kind-icon">tf</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#tokenizer" class="tsd-kind-icon">tokenizer</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#trained" class="tsd-kind-icon">trained</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#type" class="tsd-kind-icon">type</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#xshape" class="tsd-kind-icon">x<wbr>Shape</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#yshape" class="tsd-kind-icon">y<wbr>Shape</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#calculate" class="tsd-kind-icon">calculate</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#exportconfiguration" class="tsd-kind-icon">export<wbr>Configuration</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#importconfiguration" class="tsd-kind-icon">import<wbr>Configuration</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#loadmodel" class="tsd-kind-icon">load<wbr>Model</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#predict" class="tsd-kind-icon">predict</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#savemodel" class="tsd-kind-icon">save<wbr>Model</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#train" class="tsd-kind-icon">train</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#getinputshape-1" class="tsd-kind-icon">get<wbr>Input<wbr>Shape</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html#reshape-1" class="tsd-kind-icon">reshape</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">new <wbr>Text<wbr>Embedding<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">?: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#tensorscriptoptions" class="tsd-signature-type">TensorScriptOptions</a>, properties<span class="tsd-signature-symbol">?: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#tensorscriptproperties" class="tsd-signature-type">TensorScriptProperties</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html" class="tsd-signature-type">TextEmbedding</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#constructor">constructor</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/text_embedding.ts:12</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> options: <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#tensorscriptoptions" class="tsd-signature-type">TensorScriptOptions</a><span class="tsd-signature-symbol"> = {}</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Options for USE</p>
</div>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagOptional">Optional</span> properties: <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#tensorscriptproperties" class="tsd-signature-type">TensorScriptProperties</a></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>extra instance properties</p>
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_node_modules__modelx_model_src_text_embedding_.textembedding.html" class="tsd-signature-type">TextEmbedding</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="compiled" class="tsd-anchor"></a>
<h3>compiled</h3>
<div class="tsd-signature tsd-kind-icon">compiled<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#compiled">compiled</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:136</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="getinputshape" class="tsd-anchor"></a>
<h3>get<wbr>Input<wbr>Shape</h3>
<div class="tsd-signature tsd-kind-icon">get<wbr>Input<wbr>Shape<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#getinputshape">getInputShape</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:138</li>
</ul>
</aside>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
<li class="tsd-parameter-siganture">
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
</li>
</ul>
</li>
</ul>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="gettimeseriesshape" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> get<wbr>Timeseries<wbr>Shape</h3>
<div class="tsd-signature tsd-kind-icon">get<wbr>Timeseries<wbr>Shape<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span>x_timeseries<span class="tsd-signature-symbol">: </span><a href="../interfaces/_node_modules__modelx_model_src_model_interface_.nestedarray.html" class="tsd-signature-type">NestedArray</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#shape" class="tsd-signature-type">Shape</a></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#gettimeseriesshape">getTimeseriesShape</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:142</li>
</ul>
</aside>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
<li class="tsd-parameter-siganture">
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span>x_timeseries<span class="tsd-signature-symbol">: </span><a href="../interfaces/_node_modules__modelx_model_src_model_interface_.nestedarray.html" class="tsd-signature-type">NestedArray</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#shape" class="tsd-signature-type">Shape</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>x_timeseries: <a href="../interfaces/_node_modules__modelx_model_src_model_interface_.nestedarray.html" class="tsd-signature-type">NestedArray</a><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol"> | </span><span class="tsd-signature-type">undefined</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#shape" class="tsd-signature-type">Shape</a></h4>
</li>
</ul>
</li>
</ul>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="layers" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> layers</h3>
<div class="tsd-signature tsd-kind-icon">layers<span class="tsd-signature-symbol">:</span> <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#tensorscriptlayers" class="tsd-signature-type">TensorScriptLayers</a><span class="tsd-signature-symbol"> | </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#tensorscriptsavedlayers" class="tsd-signature-type">TensorScriptSavedLayers</a></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#layers">layers</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:141</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="model" class="tsd-anchor"></a>
<h3>model</h3>
<div class="tsd-signature tsd-kind-icon">model<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#model">model</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:132</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="reshape" class="tsd-anchor"></a>
<h3>reshape</h3>
<div class="tsd-signature tsd-kind-icon">reshape<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol"> => </span><span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#reshape">reshape</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:137</li>
</ul>
</aside>
<div class="tsd-type-declaration">
<h4>Type declaration</h4>
<ul class="tsd-parameters">
<li class="tsd-parameter-siganture">
<ul class="tsd-signatures tsd-kind-type-literal tsd-parent-kind-property">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">...</span>args<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagRest">Rest</span> <span class="tsd-signature-symbol">...</span>args: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
</li>
</ul>
</li>
</ul>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="settings" class="tsd-anchor"></a>
<h3>settings</h3>
<div class="tsd-signature tsd-kind-icon">settings<span class="tsd-signature-symbol">:</span> <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#tensorscriptoptions" class="tsd-signature-type">TensorScriptOptions</a></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#settings">settings</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:131</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="tf" class="tsd-anchor"></a>
<h3>tf</h3>
<div class="tsd-signature tsd-kind-icon">tf<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#tf">tf</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:134</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="tokenizer" class="tsd-anchor"></a>
<h3>tokenizer</h3>
<div class="tsd-signature tsd-kind-icon">tokenizer<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#tokenizer">tokenizer</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:133</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="trained" class="tsd-anchor"></a>
<h3>trained</h3>
<div class="tsd-signature tsd-kind-icon">trained<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#trained">trained</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:135</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="type" class="tsd-anchor"></a>
<h3>type</h3>
<div class="tsd-signature tsd-kind-icon">type<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#type">type</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:130</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="xshape" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> x<wbr>Shape</h3>
<div class="tsd-signature tsd-kind-icon">x<wbr>Shape<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#xshape">xShape</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:139</li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="yshape" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagOptional">Optional</span> y<wbr>Shape</h3>
<div class="tsd-signature tsd-kind-icon">y<wbr>Shape<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#yshape">yShape</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:140</li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="calculate" class="tsd-anchor"></a>
<h3>calculate</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">calculate<span class="tsd-signature-symbol">(</span>input_array<span class="tsd-signature-symbol">: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#inputtextarray" class="tsd-signature-type">InputTextArray</a>, options<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-symbol">{}</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#calculate">calculate</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/text_embedding.ts:53</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Calculates sentence embeddings</p>
</div>
<dl class="tsd-comment-tags">
<dt>override</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>input_array: <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#inputtextarray" class="tsd-signature-type">InputTextArray</a></h5>
<div class="tsd-comment tsd-typography">
<p>new test independent variables</p>
</div>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> options: <span class="tsd-signature-symbol">{}</span><span class="tsd-signature-symbol"> = {}</span></h5>
<div class="tsd-comment tsd-typography">
<p>model prediction options</p>
</div>
<ul class="tsd-parameters">
</ul>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
<p>returns tensorflow prediction</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="exportconfiguration" class="tsd-anchor"></a>
<h3>export<wbr>Configuration</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">export<wbr>Configuration<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../interfaces/_node_modules__modelx_model_src_model_interface_.tensorscriptcontext.html" class="tsd-signature-type">TensorScriptContext</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#exportconfiguration">exportConfiguration</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:267</li>
</ul>
</aside>
<h4 class="tsd-returns-title">Returns <a href="../interfaces/_node_modules__modelx_model_src_model_interface_.tensorscriptcontext.html" class="tsd-signature-type">TensorScriptContext</a></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="importconfiguration" class="tsd-anchor"></a>
<h3>import<wbr>Configuration</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">import<wbr>Configuration<span class="tsd-signature-symbol">(</span>configuration<span class="tsd-signature-symbol">: </span><a href="../interfaces/_node_modules__modelx_model_src_model_interface_.tensorscriptcontext.html" class="tsd-signature-type">TensorScriptContext</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#importconfiguration">importConfiguration</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:278</li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>configuration: <a href="../interfaces/_node_modules__modelx_model_src_model_interface_.tensorscriptcontext.html" class="tsd-signature-type">TensorScriptContext</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="loadmodel" class="tsd-anchor"></a>
<h3>load<wbr>Model</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">load<wbr>Model<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#loadmodel">loadModel</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:317</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Loads a saved tensoflow / keras model, this is an alias for</p>
</div>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="https://www.tensorflow.org/js/guide/save_load#loading_a_tfmodel" class="external">https://www.tensorflow.org/js/guide/save_load#loading_a_tfmodel</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>options: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>tensorflow load model options</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4>
<p>tensorflow model</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="predict" class="tsd-anchor"></a>
<h3>predict</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">predict<span class="tsd-signature-symbol">(</span>input_array<span class="tsd-signature-symbol">: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#inputtextarray" class="tsd-signature-type">InputTextArray</a>, options<span class="tsd-signature-symbol">?: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#predictionoptions" class="tsd-signature-type">PredictionOptions</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#matrix" class="tsd-signature-type">Matrix</a><span class="tsd-signature-symbol"> | </span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#vector-1" class="tsd-signature-type">Vector</a><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#predict">predict</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/text_embedding.ts:65</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns prediction values from tensorflow model</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>input_array: <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#inputtextarray" class="tsd-signature-type">InputTextArray</a></h5>
</li>
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> options: <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#predictionoptions" class="tsd-signature-type">PredictionOptions</a><span class="tsd-signature-symbol"> = {}</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#matrix" class="tsd-signature-type">Matrix</a><span class="tsd-signature-symbol"> | </span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#vector-1" class="tsd-signature-type">Vector</a><span class="tsd-signature-symbol">></span></h4>
<p>predicted model values</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="savemodel" class="tsd-anchor"></a>
<h3>save<wbr>Model</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">save<wbr>Model<span class="tsd-signature-symbol">(</span>options<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#savemodel">saveModel</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:330</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>saves a tensorflow model, this is an alias for</p>
</div>
<dl class="tsd-comment-tags">
<dt>see</dt>
<dd><p><a href="https://www.tensorflow.org/js/guide/save_load#save_a_tfmodel" class="external">https://www.tensorflow.org/js/guide/save_load#save_a_tfmodel</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>options: <span class="tsd-signature-type">string</span></h5>
<div class="tsd-comment tsd-typography">
<p>tensorflow save model options</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4>
<p>tensorflow model</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="train" class="tsd-anchor"></a>
<h3>train</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">train<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#train">train</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/text_embedding.ts:30</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Asynchronously loads Universal Sentence Encoder and tokenizer</p>
</div>
<dl class="tsd-comment-tags">
<dt>override</dt>
<dd></dd>
</dl>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">></span></h4>
<p>returns loaded UniversalSentenceEncoder model</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="getinputshape-1" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> get<wbr>Input<wbr>Shape</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">get<wbr>Input<wbr>Shape<span class="tsd-signature-symbol">(</span>matrix<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#shape" class="tsd-signature-type">Shape</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#getinputshape">getInputShape</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:248</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Returns the shape of an input matrix</p>
</div>
<dl class="tsd-comment-tags">
<dt>function</dt>
<dd></dd>
<dt>example</dt>
<dd><p>const input = [
[ 0, 1, ],
[ 1, 0, ],
];
TensorScriptModelInterface.getInputShape(input) // => [2,2]</p>
</dd>
<dt>see</dt>
<dd><p>{<a href="https://stackoverflow.com/questions/10237615/get-size-of-dimensions-in-array%7D">https://stackoverflow.com/questions/10237615/get-size-of-dimensions-in-array}</a></p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5><span class="tsd-flag ts-flagDefault value">Default value</span> matrix: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = []</span></h5>
<div class="tsd-comment tsd-typography">
<p>input matrix</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#shape" class="tsd-signature-type">Shape</a></h4>
<p>returns the shape of a matrix (e.g. [2,2])</p>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="reshape-1" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> reshape</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">reshape<span class="tsd-signature-symbol">(</span>array<span class="tsd-signature-symbol">: </span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#vector-1" class="tsd-signature-type">Vector</a>, shape<span class="tsd-signature-symbol">: </span><a href="../modules/_node_modules__modelx_model_src_model_interface_.html#shape" class="tsd-signature-type">Shape</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#matrix" class="tsd-signature-type">Matrix</a><span class="tsd-signature-symbol"> | </span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#vector-1" class="tsd-signature-type">Vector</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html">TensorScriptModelInterface</a>.<a href="_node_modules__modelx_model_src_model_interface_.tensorscriptmodelinterface.html#reshape">reshape</a></p>
<ul>
<li>Defined in Users/yawjosephetse/Developer/github/repetere/modelx/node_modules/@modelx/model/src/model_interface.ts:183</li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>Reshapes an array</p>
</div>
<dl class="tsd-comment-tags">
<dt>function</dt>
<dd></dd>
<dt>example</dt>
<dd><p>const array = [ 0, 1, 1, 0, ];
const shape = [2,2];
TensorScriptModelInterface.reshape(array,shape) // =>
[
[ 0, 1, ],
[ 1, 0, ],
];</p>
</dd>
</dl>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>array: <a href="../modules/_node_modules__modelx_data_src_dataset_.html#vector-1" class="tsd-signature-type">Vector</a></h5>
<div class="tsd-comment tsd-typography">
<p>input array</p>
</div>
</li>
<li>
<h5>shape: <a href="../modules/_node_modules__modelx_model_src_model_interface_.html#shape" class="tsd-signature-type">Shape</a></h5>
<div class="tsd-comment tsd-typography">
<p>shape array</p>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="../modules/_node_modules__modelx_data_src_dataset_.html#matrix" class="tsd-signature-type">Matrix</a><span class="tsd-signature-symbol"> | </span><a href="../modules/_node_modules__modelx_data_src_dataset_.html#vector-1" class="tsd-signature-type">Vector</a></h4>
<p>returns a matrix with the defined shape</p>
</li>
</ul>
</section>
</section>
</