<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – TensorFlow models</title>
    <link>/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/</link>
    <description>Recent content in TensorFlow models on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Data-Analysis: TensorFlow integration and directory structure</title>
      <link>/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-integration-and-directory-structure/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-integration-and-directory-structure/</guid>
      <description>
        
        
        &lt;p&gt;This page covers importing Tensorflow models into OpenText™ Analytics Database, making predictions on data in the database, and exporting the model for use on another database cluster or a third-party platform.&lt;/p&gt;
&lt;p&gt;For a start-to-finish example through each operation, see &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-example/#&#34;&gt;TensorFlow example&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;OpenText™ Analytics Database supports models created with either TensorFlow 1.x and 2.x, but 2.x is strongly recommended.&lt;/p&gt;
&lt;p&gt;To use TensorFlow, install the TFIntegration UDX package on any node. You only need to do this once:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ /opt/vertica/bin/admintools -t install_package -d &lt;span class=&#34;code-variable&#34;&gt;database_name&lt;/span&gt; -p &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt;&amp;#39; --package TFIntegration
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;directory-and-file-structure-for-tensorflow-models&#34;&gt;Directory and file structure for TensorFlow models&lt;/h2&gt;
&lt;p&gt;Before importing your models, you should have a separate directory for each model that contains each of the following files. Note that the database uses the directory name as the model name when you import it:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;em&gt;&lt;code&gt;model_name&lt;/code&gt;&lt;/em&gt;&lt;code&gt;.pb&lt;/code&gt;: a trained model in frozen graph format&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;tf_model_desc.json&lt;/code&gt;: a description of the model&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For example, a &lt;code&gt;tf_models&lt;/code&gt; directory that contains two models, &lt;code&gt;tf_mnist_estimator&lt;/code&gt; and &lt;code&gt;tf_mnist_keras&lt;/code&gt;, has the following layout:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;tf_models/
├── tf_mnist_estimator
│   ├── mnist_estimator.pb
│   └── tf_model_desc.json
└── tf_mnist_keras
    ├── mnist_keras.pb
    └── tf_model_desc.json
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can generate both of these files for a given TensorFlow 2 (TF2) model with the &lt;code&gt;freeze_tf2_model.py&lt;/code&gt; script included in the &lt;a href=&#34;https://github.com/vertica/Machine-Learning-Examples/blob/master/TensorFlow/freeze_tf2_model.py&#34;&gt;&lt;code&gt;Machine-Learning-Examples&lt;/code&gt;&lt;/a&gt; GitHub repository and in the &lt;code&gt;opt/vertica/packages/TFIntegration/examples&lt;/code&gt; directory in the database. The script accepts three arguments:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;model-path&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Path to a saved TF2 model directory.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;folder-name&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) Name of the folder to which the frozen model is saved; by default, &lt;code&gt;frozen_tfmodel&lt;/code&gt;.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;column-type&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) Integer, either 0 or 1, that signifies whether the input and output columns for the model are primitive or complex types. Use a value of 0 (default) for primitive types, or 1 for complex.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;For example, the following call outputs the frozen &lt;code&gt;tf_autoencoder&lt;/code&gt; model, which accepts complex input/output columns, into the &lt;code&gt;frozen_autoencoder&lt;/code&gt; folder:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ python3 ./freeze_tf2_model.py path/to/tf_autoencoder frozen_autoencoder 1
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;tf_model_descjson&#34;&gt;tf_model_desc.json&lt;/h3&gt;
&lt;p&gt;The &lt;code&gt;tf_model_desc.json&lt;/code&gt; file forms the bridge between TensorFlow and the database. It describes the structure of the model so that the database can correctly match up its inputs and outputs to input/output tables.&lt;/p&gt;
&lt;p&gt;Notice that the &lt;code&gt;freeze_tf2_model.py&lt;/code&gt; script automatically generates this file for your TensorFlow 2 model, and this generated file can often be used as-is. For more complex models or use cases, you might have to edit this file. For a detailed breakdown of each field, see &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tf-model-desc-json-overview/#&#34;&gt;tf_model_desc.json overview&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;importing-tensorflow-models&#34;&gt;Importing TensorFlow models&lt;/h2&gt;
&lt;p&gt;To import TensorFlow models, use &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/import-models/#&#34;&gt;IMPORT_MODELS&lt;/a&gt; with the category &lt;code&gt;&#39;TENSORFLOW&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Import a single model. Keep in mind that the database uses the directory name as the model name:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;select IMPORT_MODELS ( &amp;#39;/path/tf_models/tf_mnist_keras&amp;#39; USING PARAMETERS category=&amp;#39;TENSORFLOW&amp;#39;);
 import_models
---------------
 Success
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Import all models in the directory (where each model has its own directory) with a wildcard (*):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;select IMPORT_MODELS (&amp;#39;/path/tf_models/*&amp;#39; USING PARAMETERS category=&amp;#39;TENSORFLOW&amp;#39;);
 import_models
---------------
 Success
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;make-predictions-with-an-imported-tensorflow-model&#34;&gt;Make predictions with an imported TensorFlow model&lt;/h2&gt;
&lt;p&gt;After importing your TensorFlow model, you can use the model to predict on data in a database table. OpenText™ Analytics Database provides two functions for making predictions with imported TensorFlow models: &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-tensorflow/#&#34;&gt;PREDICT_TENSORFLOW&lt;/a&gt; and &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-tensorflow-scalar/#&#34;&gt;PREDICT_TENSORFLOW_SCALAR&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The function you choose depends on whether you specified a &lt;em&gt;&lt;code&gt;column-type&lt;/code&gt;&lt;/em&gt; of 0 or 1 when calling the &lt;code&gt;freeze_tf2_model.py&lt;/code&gt; script. If &lt;em&gt;&lt;code&gt;column-type&lt;/code&gt;&lt;/em&gt; was 0, meaning the model accepts primitive input and output types, use PREDICT_TENSORFLOW to make predictions; otherwise, use PREDICT_TENSORFLOW_SCALAR, as your model should accept complex input and output types.&lt;/p&gt;
&lt;h3 id=&#34;using-predict_tensorflow&#34;&gt;Using PREDICT_TENSORFLOW&lt;/h3&gt;
&lt;p&gt;The &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-tensorflow/#&#34;&gt;PREDICT_TENSORFLOW&lt;/a&gt; function is different from the other predict functions in that it does not accept any parameters that affect the input columns such as &amp;quot;exclude_columns&amp;quot; or &amp;quot;id_column&amp;quot;; rather, the function always predicts on all the input columns provided. However, it does accept a &lt;code&gt;num_passthru_cols&lt;/code&gt; parameter which allows the user to &amp;quot;skip&amp;quot; some number of input columns, as shown below.&lt;/p&gt;
&lt;p&gt;The OVER(PARTITION BEST) clause tells the database to parallelize the operation across multiple nodes. See &lt;a href=&#34;../../../../../en/sql-reference/language-elements/window-clauses/window-partition-clause/#&#34;&gt;Window partition clause&lt;/a&gt; for details:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; select PREDICT_TENSORFLOW (*
                   USING PARAMETERS model_name=&amp;#39;tf_mnist_keras&amp;#39;, num_passthru_cols=1)
                   OVER(PARTITION BEST) FROM tf_mnist_test_images;

--example output, the skipped columns are displayed as the first columns of the output
 ID | col0 | col1 | col2 | col3 | col4 | col5 | col6 | col7 | col8 | col9
----+------+------+------+------+------+------+------+------+------+------
  1 |    0 |    0 |    1 |    0 |    0 |    0 |    0 |    0 |    0 |    0
  3 |    1 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0
  6 |    0 |    0 |    0 |    0 |    1 |    0 |    0 |    0 |    0 |    0
...
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;using-predict_tensorflow_scalar&#34;&gt;Using PREDICT_TENSORFLOW_SCALAR&lt;/h3&gt;
&lt;p&gt;The PREDICT_TENSORFLOW_SCALAR function accepts one input column of type &lt;a href=&#34;../../../../../en/sql-reference/data-types/complex-types/row/#&#34;&gt;ROW&lt;/a&gt;, where each field corresponds to an input tensor. It returns one output column of type ROW, where each field corresponds to an output tensor. This complex type support can simplify the process for making predictions on data with many input features.&lt;/p&gt;
&lt;p&gt;For instance, the &lt;a href=&#34;http://yann.lecun.com/exdb/mnist/&#34;&gt;MNIST handwritten digit classification dataset&lt;/a&gt; contains 784 input features for each input row, one feature for each pixel in the images of handwritten digits. The PREDICT_TENSORFLOW function requires that each of these input features are contained in a separate input column. By encapsulating these features into a single ARRAY, the PREDICT_TENSORFLOW_SCALAR function only needs a single input column of type ROW, where the pixel values are the array elements for an input field:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;--Each array for the &amp;#34;image&amp;#34; field has 784 elements. 
=&amp;gt; SELECT * FROM mnist_train;
id |                   inputs
---+---------------------------------------------
 1 | {&amp;#34;image&amp;#34;:[0, 0, 0,..., 244, 222, 210,...]}
 2 | {&amp;#34;image&amp;#34;:[0, 0, 0,..., 185, 84, 223,...]}
 3 | {&amp;#34;image&amp;#34;:[0, 0, 0,..., 133, 254, 78,...]}
 ...
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In this case, the function output consists of a single opeartion with one tensor. The value of this field is an array of ten elements, which are all zero except for the element whose index is the predicted digit:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT id, PREDICT_TENSORFLOW_SCALAR(inputs USING PARAMETERS model_name=&amp;#39;tf_mnist_ct&amp;#39;) FROM mnist_test;
 id |                   PREDICT_TENSORFLOW_SCALAR                      
----+-------------------------------------------------------------------
  1 | {&amp;#34;prediction:0&amp;#34;:[&amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;1&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;]} 
  2 | {&amp;#34;prediction:0&amp;#34;:[&amp;#34;0&amp;#34;, &amp;#34;1&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;]} 
  3 | {&amp;#34;prediction:0&amp;#34;:[&amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;1&amp;#34;, &amp;#34;0&amp;#34;, &amp;#34;0&amp;#34;]} 
...
&lt;/code&gt;&lt;/pre&gt;
&lt;h2 id=&#34;exporting-tensorflow-models&#34;&gt;Exporting TensorFlow models&lt;/h2&gt;
&lt;p&gt;The database exports the model as a frozen graph, which can then be re-imported at any time. Keep in mind that models that are saved as a frozen graph cannot be trained further.&lt;/p&gt;
&lt;p&gt;Use &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/export-models/#&#34;&gt;EXPORT_MODELS&lt;/a&gt; to export TensorFlow models. For example, to export the &lt;code&gt;tf_mnist_keras&lt;/code&gt; model to the &lt;code&gt;/path/to/export/to&lt;/code&gt; directory:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT EXPORT_MODELS (&amp;#39;/path/to/export/to&amp;#39;, &amp;#39;tf_mnist_keras&amp;#39;);
 export_models
---------------
 Success
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;When you export a TensorFlow model, the database creates and uses the specified directory to store files that describe the model:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ls tf_mnist_keras/
crc.json  metadata.json  mnist_keras.pb  model.json  tf_model_desc.json
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The &lt;code&gt;.pb&lt;/code&gt; and &lt;code&gt;tf_model_desc.json&lt;/code&gt; files describe the model, and the rest are organizational files created by the database.

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
File Name&lt;/th&gt; 

&lt;th &gt;
Purpose&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;model_name.pb&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Frozen graph of the model.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;tf_model_desc.json&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Describes the model.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;crc.json&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Keeps track of files in this directory and their sizes. It is used for importing models.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;metadata.json&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
Contains database version, model type, and other information.&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
&lt;code&gt;model.json&lt;/code&gt;&lt;/td&gt; 

&lt;td &gt;
More verbose version of &lt;code&gt;tf_model_desc.json&lt;/code&gt;.&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/#&#34;&gt;TensorFlow models&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-example/#&#34;&gt;TensorFlow example&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/import-models/#&#34;&gt;IMPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/export-models/#&#34;&gt;EXPORT_MODELS&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-tensorflow/#&#34;&gt;PREDICT_TENSORFLOW&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: TensorFlow example</title>
      <link>/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-example/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-example/</guid>
      <description>
        
        
        &lt;p&gt;OpenText™ Analytics Database uses the TFIntegration UDX package to integrate with TensorFlow. You can train your models outside of your database, then import them and make predictions on your data.&lt;/p&gt;
&lt;p&gt;TensorFlow scripts and datasets are included in the GitHub repository under &lt;a href=&#34;https://github.com/vertica/Machine-Learning-Examples/tree/master/TensorFlow&#34;&gt;Machine-Learning-Examples/TensorFlow&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The example below creates a Keras (a TensorFlow API) neural network model trained on the &lt;a href=&#34;http://yann.lecun.com/exdb/mnist/&#34;&gt;MNIST handwritten digit classification dataset&lt;/a&gt;, the layers of which are shown below.&lt;/p&gt;
&lt;p&gt;The data is fed through each layer from top to bottom, and each layer modifies the input before returning a score. In this example, the data passed in is a set of images of handwritten Arabic numerals and the output would be the probability of the input image being a particular digit:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;inputs = keras.Input(shape=(28, 28, 1), name=&amp;#34;image&amp;#34;)
x = layers.Conv2D(32, 5, activation=&amp;#34;relu&amp;#34;)(inputs)
x = layers.MaxPooling2D(2)(x)
x = layers.Conv2D(64, 5, activation=&amp;#34;relu&amp;#34;)(x)
x = layers.MaxPooling2D(2)(x)
x = layers.Flatten()(x)
x = layers.Dense(10, activation=&amp;#39;softmax&amp;#39;, name=&amp;#39;OUTPUT&amp;#39;)(x)
tfmodel = keras.Model(inputs, x)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For more information on how TensorFlow interacts with your database and how to import more complex models, see &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-integration-and-directory-structure/#&#34;&gt;TensorFlow integration and directory structure&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;prepare-a-tensorflow-model&#34;&gt;Prepare a TensorFlow model&lt;/h2&gt;
&lt;p&gt;The following procedures take place outside of the database.&lt;/p&gt;
&lt;h3 id=&#34;train-and-save-a-tensorflow-model&#34;&gt;Train and save a TensorFlow model&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://www.tensorflow.org/install&#34;&gt;Install TensorFlow 2&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Train your model. For this particular example, you can run &lt;a href=&#34;https://github.com/vertica/Machine-Learning-Examples/tree/master/TensorFlow/train_simple_model.py&#34;&gt;train_simple_model.py&lt;/a&gt; to train and save the model. Otherwise, &lt;a href=&#34;https://www.tensorflow.org/tutorials/quickstart/beginner&#34;&gt; and more generally, you can manually train your model in Python&lt;/a&gt; and then &lt;a href=&#34;https://www.tensorflow.org/tutorials/keras/save_and_load&#34;&gt;save it&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ mymodel.save(&amp;#39;my_saved_model_dir&amp;#39;)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the &lt;code&gt;freeze_tf2_model.py&lt;/code&gt; script included in the &lt;a href=&#34;https://github.com/vertica/Machine-Learning-Examples/tree/master/TensorFlow&#34;&gt;Machine-Learning-Examples repository&lt;/a&gt; or in &lt;code&gt;opt/vertica/packages/TFIntegration/examples&lt;/code&gt;, specifying your model, an output directory (optional, defaults to &lt;code&gt;frozen_tfmodel&lt;/code&gt;), and the input and output column type (0 for primitive, 1 for complex).&lt;/p&gt;
&lt;p&gt;This script transforms your saved model into a compatible frozen graph format and creates the &lt;code&gt;tf_model_desc.json&lt;/code&gt; file, which describes how the database should translate its tables to TensorFlow tensors:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ ./freeze_tf2_model.py path/to/tf/model frozen_model_dir 0
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;import-tensorflow-models-and-make-predictions&#34;&gt;Import TensorFlow models and make predictions&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;If you haven&#39;t already, as &lt;code&gt;dbadmin&lt;/code&gt;, install the TFIntegration UDX package on any node. You only need to do this once. &lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ /opt/vertica/bin/admintools -t install_package -d &lt;span class=&#34;code-variable&#34;&gt;database_name&lt;/span&gt; -p &amp;#39;&lt;span class=&#34;code-variable&#34;&gt;password&lt;/span&gt;&amp;#39; --package TFIntegration
&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;code&gt;directory&lt;/code&gt; to any node in your database cluster and import the model:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT IMPORT_MODELS(&amp;#39;path/to/frozen_model_dir&amp;#39; USING PARAMETERS category=&amp;#39;TENSORFLOW&amp;#39;);
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the dataset you want to make a prediction on. For this example:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Copy the &lt;code&gt;Machine-Learning-Examples/TensorFlow/data&lt;/code&gt; directory to any node on your database cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;From that &lt;code&gt;data&lt;/code&gt; directory, run the SQL script &lt;code&gt;load_tf_data.sql&lt;/code&gt; to load the MNIST dataset:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ vsql -f load_tf_data.sql
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Make a prediction with your model on your dataset with &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-tensorflow/#&#34;&gt;PREDICT_TENSORFLOW&lt;/a&gt;. In this example, the model is used to classify the images of handwritten numbers in the MNIST dataset:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT PREDICT_TENSORFLOW (*
                   USING PARAMETERS model_name=&amp;#39;tf_mnist_keras&amp;#39;, num_passthru_cols=1)
                   OVER(PARTITION BEST) FROM tf_mnist_test_images;

--example output, the skipped columns are displayed as the first columns of the output
 ID | col0 | col1 | col2 | col3 | col4 | col5 | col6 | col7 | col8 | col9
----+------+------+------+------+------+------+------+------+------+------
  1 |    0 |    0 |    1 |    0 |    0 |    0 |    0 |    0 |    0 |    0
  3 |    1 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0 |    0
  6 |    0 |    0 |    0 |    0 |    1 |    0 |    0 |    0 |    0 |    0
...
&lt;/code&gt;&lt;/pre&gt;
&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

Because a &lt;em&gt;&lt;code&gt;column-type&lt;/code&gt;&lt;/em&gt; of 0 was used when calling the &lt;code&gt;freeze_tf2_model.py&lt;/code&gt; script, the PREDICT_TENSORFLOW function must be used to make predictions. If &lt;em&gt;&lt;code&gt;column-type&lt;/code&gt;&lt;/em&gt; was 1, meaning the model accepts complex input and output types, predictions must be made with the &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-tensorflow-scalar/#&#34;&gt;PREDICT_TENSORFLOW_SCALAR&lt;/a&gt; function.

&lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To export the model with &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/model-management/export-models/#&#34;&gt;EXPORT_MODELS&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT EXPORT_MODELS(&amp;#39;/path/to/export/to&amp;#39;, &amp;#39;tf_mnist_keras&amp;#39;);
 EXPORT_MODELS
---------------
 Success
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

While you cannot continue training a TensorFlow model after you export it from the database, you can use it to predict on data in another database cluster, or outside the database on another platform.

&lt;/div&gt;
&lt;h2 id=&#34;tensorflow-1-deprecated&#34;&gt;TensorFlow 1 (deprecated)&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;a href=&#34;https://www.tensorflow.org/install/pip&#34;&gt;Install TensorFlow 1.15&lt;/a&gt; with Python 3.7 or below.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run &lt;code&gt;train_save_model.py&lt;/code&gt; in &lt;code&gt;Machine-Learning-Examples/TensorFlow/tf1&lt;/code&gt; to train and save the model in TensorFlow and frozen graph formats.&lt;/p&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

OpenText™ Analytics Database does not supply a script to save and freeze TensorFlow 1 models that use complex column types.

&lt;/div&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/#&#34;&gt;TensorFlow models&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/extending/udxs/#&#34;&gt;User-defined extensions&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Data-Analysis: tf_model_desc.json overview</title>
      <link>/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tf-model-desc-json-overview/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tf-model-desc-json-overview/</guid>
      <description>
        
        
        &lt;p&gt;Before importing your externally trained TensorFlow models, you must:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;save the model in frozen graph (&lt;code&gt;.pb&lt;/code&gt;) format&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;create &lt;code&gt;tf_model_desc.json&lt;/code&gt;, which describes to your database how to map its inputs and outputs to input/output tables&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Conveniently, the script &lt;a href=&#34;https://github.com/vertica/Machine-Learning-Examples/blob/master/TensorFlow/freeze_tf2_model.py&#34;&gt;&lt;code&gt;freeze_tf2_model.py&lt;/code&gt;&lt;/a&gt; included in the &lt;code&gt;TensorFlow&lt;/code&gt; directory of the &lt;a href=&#34;https://github.com/vertica/Machine-Learning-Examples&#34;&gt;Machine-Learning-Examples&lt;/a&gt; repository (and in &lt;code&gt;opt/vertica/packages/TFIntegration/examples&lt;/code&gt;) will do both of these automatically. In most cases, the generated &lt;code&gt;tf_model_desc.json&lt;/code&gt; can be used as-is, but for more complex datasets and use cases, you might need to edit it.&lt;/p&gt;
&lt;p&gt;The contents of the &lt;code&gt;tf_model_desc.json&lt;/code&gt; file depend on whether you provide a &lt;em&gt;&lt;code&gt;column-type&lt;/code&gt;&lt;/em&gt; of 0 or 1 when calling the &lt;code&gt;freeze_tf2_model.py&lt;/code&gt; script. If &lt;em&gt;&lt;code&gt;column-type&lt;/code&gt;&lt;/em&gt; is 0, the imported model accepts primitive input and output columns. If it is 1, the model accepts complex input and output columns.&lt;/p&gt;
&lt;h2 id=&#34;models-that-accept-primitive-types&#34;&gt;Models that accept primitive types&lt;/h2&gt;
&lt;p&gt;The following &lt;code&gt;tf_model_desc.json&lt;/code&gt; is generated from the MNIST handwriting dataset used by the &lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-example/#&#34;&gt;TensorFlow example&lt;/a&gt;.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{
    &amp;#34;frozen_graph&amp;#34;: &amp;#34;mnist_keras.pb&amp;#34;,
    &amp;#34;input_desc&amp;#34;: [
        {
            &amp;#34;op_name&amp;#34;: &amp;#34;image_input&amp;#34;,
            &amp;#34;tensor_map&amp;#34;: [
                {
                    &amp;#34;idx&amp;#34;: 0,
                    &amp;#34;dim&amp;#34;: [
                        1,
                        28,
                        28,
                        1
                    ],
                    &amp;#34;col_start&amp;#34;: 0
                }
            ]
        }
    ],
    &amp;#34;output_desc&amp;#34;: [
        {
            &amp;#34;op_name&amp;#34;: &amp;#34;OUTPUT/Softmax&amp;#34;,
            &amp;#34;tensor_map&amp;#34;: [
                {
                    &amp;#34;idx&amp;#34;: 0,
                    &amp;#34;dim&amp;#34;: [
                        1,
                        10
                    ],
                    &amp;#34;col_start&amp;#34;: 0
                }
            ]
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This file describes the structure of the model&#39;s inputs and outputs. It must contain a &lt;code&gt;frozen_graph&lt;/code&gt; field that matches the filename of the .pb model, an &lt;code&gt;input_desc&lt;/code&gt; field, and an &lt;code&gt;output_desc&lt;/code&gt; field.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;input_desc&lt;/code&gt; and &lt;code&gt;output_desc&lt;/code&gt;: the descriptions of the input and output nodes in the TensorFlow graph. Each of these include the following fields:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;op_name&lt;/code&gt;: the name of the operation node which is set when creating and training the model. You can typically retrieve the names of these parameters from &lt;code&gt;tfmodel.&lt;/code&gt;&lt;em&gt;&lt;code&gt;inputs&lt;/code&gt;&lt;/em&gt; and &lt;code&gt;tfmodel.&lt;/code&gt;&lt;em&gt;&lt;code&gt;outputs&lt;/code&gt;&lt;/em&gt;. For example:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
$ print({t.name:t for t in tfmodel.inputs})
{&amp;#39;image_input:0&amp;#39;: &amp;lt;tf.Tensor &amp;#39;image_input:0&amp;#39; shape=(?, 28, 28, 1) dtype=float32&amp;gt;}
&lt;/code&gt;&lt;/pre&gt;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;$ print({t.name:t for t in tfmodel.outputs})
{&amp;#39;OUTPUT/Softmax:0&amp;#39;: &amp;lt;tf.Tensor &amp;#39;OUTPUT/Softmax:0&amp;#39; shape=(?, 10) dtype=float32&amp;gt;}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;In this case, the respective values for &lt;code&gt;op_name&lt;/code&gt; would be the following.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;input_desc&lt;/code&gt;: &lt;code&gt;image_input&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;output_desc&lt;/code&gt;: &lt;code&gt;OUTPUT/Softmax&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For a more detailed example of this process, review the code for &lt;code&gt;freeze_tf2_model.py&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;tensor_map&lt;/code&gt;: how to map the tensor to database columns, which can be specified with the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;idx&lt;/code&gt;: the index of the output tensor under the given operation (should be 0 for the first output, 1 for the second output, etc.).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;dim&lt;/code&gt;: the vector holding the dimensions of the tensor; it provides the number of columns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;col_start&lt;/code&gt; (only used if &lt;code&gt;col_idx&lt;/code&gt; is not specified): the starting column index. When used with &lt;code&gt;dim&lt;/code&gt;, it specifies a range of indices of database columns starting at &lt;code&gt;col_start&lt;/code&gt; and ending at &lt;code&gt;col_start&lt;/code&gt;+&lt;em&gt;&lt;code&gt;flattend_tensor_dimension&lt;/code&gt;&lt;/em&gt;. The database starts at the column specified by the index &lt;code&gt;col_start&lt;/code&gt; and gets the next &lt;em&gt;&lt;code&gt;flattened_tensor_dimension&lt;/code&gt;&lt;/em&gt; columns.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;col_idx&lt;/code&gt;: the indices in the database columns corresponding to the flattened tensors. This allows you explicitly specify the indices of the database columns that couldn&#39;t otherwise be specified as a simple range with &lt;code&gt;col_start&lt;/code&gt; and &lt;code&gt;dim&lt;/code&gt; (e.g. 1, 3, 5, 7).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;data_type&lt;/code&gt; (not shown): the data type of the input or output, one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;TF_FLOAT (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_DOUBLE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT8&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT16&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT32&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT64&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Below is a more complex example that includes multiple inputs and outputs:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{
    &amp;#34;input_desc&amp;#34;: [
        {
            &amp;#34;op_name&amp;#34;: &amp;#34;input1&amp;#34;,
            &amp;#34;tensor_map&amp;#34;: [
                {
                    &amp;#34;idx&amp;#34;: 0,
                    &amp;#34;dim&amp;#34;: [
                        4
                    ],
                    &amp;#34;col_idx&amp;#34;: [
                        0,
                        1,
                        2,
                        3
                    ]
                },
                {
                    &amp;#34;idx&amp;#34;: 1,
                    &amp;#34;dim&amp;#34;: [
                        2,
                        2
                    ],
                    &amp;#34;col_start&amp;#34;: 4
                }
            ]
        },
        {
            &amp;#34;op_name&amp;#34;: &amp;#34;input2&amp;#34;,
            &amp;#34;tensor_map&amp;#34;: [
                {
                    &amp;#34;idx&amp;#34;: 0,
                    &amp;#34;dim&amp;#34;: [],
                    &amp;#34;col_idx&amp;#34;: [
                        8
                    ]
                },
                {
                    &amp;#34;idx&amp;#34;: 1,
                    &amp;#34;dim&amp;#34;: [
                        2
                    ],
                    &amp;#34;col_start&amp;#34;: 9
                }
            ]
        }
    ],
    &amp;#34;output_desc&amp;#34;: [
        {
            &amp;#34;op_name&amp;#34;: &amp;#34;output&amp;#34;,
            &amp;#34;tensor_map&amp;#34;: [
                {
                    &amp;#34;idx&amp;#34;: 0,
                    &amp;#34;dim&amp;#34;: [
                        2
                    ],
                    &amp;#34;col_start&amp;#34;: 0
                }
            ]
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;models-that-accept-complex-types&#34;&gt;Models that accept complex types&lt;/h2&gt;
&lt;p&gt;The following &lt;code&gt;tf_model_desc.json&lt;/code&gt; is generated from a model that inputs and outputs complex type columns:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;{
    &amp;#34;column_type&amp;#34;: &amp;#34;complex&amp;#34;,
    &amp;#34;frozen_graph&amp;#34;: &amp;#34;frozen_graph.pb&amp;#34;,
    &amp;#34;input_tensors&amp;#34;: [
        {
            &amp;#34;name&amp;#34;: &amp;#34;x:0&amp;#34;,
            &amp;#34;data_type&amp;#34;: &amp;#34;int32&amp;#34;,
            &amp;#34;dims&amp;#34;: [
                -1,
                1
            ]
        },
        {
            &amp;#34;name&amp;#34;: &amp;#34;x_1:0&amp;#34;,
            &amp;#34;data_type&amp;#34;: &amp;#34;int32&amp;#34;,
            &amp;#34;dims&amp;#34;: [
                -1,
                2
            ]
        }
    ],
    &amp;#34;output_tensors&amp;#34;: [
        {
            &amp;#34;name&amp;#34;: &amp;#34;Identity:0&amp;#34;,
            &amp;#34;data_type&amp;#34;: &amp;#34;float32&amp;#34;,
            &amp;#34;dims&amp;#34;: [
                -1,
                1
            ]
        },
        {
            &amp;#34;name&amp;#34;: &amp;#34;Identity_1:0&amp;#34;,
            &amp;#34;data_type&amp;#34;: &amp;#34;float32&amp;#34;,
            &amp;#34;dims&amp;#34;: [
                -1,
                2
            ]
        }
    ]
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;As with models that accept primitive types, this file describes the structure of the model&#39;s inputs and outputs and contains a &lt;code&gt;frozen_graph&lt;/code&gt; field that matches the filename of the .pb model. However, instead of an &lt;code&gt;input_desc&lt;/code&gt; field and an &lt;code&gt;output_desc&lt;/code&gt; field, models with complex types have an &lt;code&gt;input_tensors&lt;/code&gt; field and an &lt;code&gt;output_tensors&lt;/code&gt; field, as well as a &lt;code&gt;column_type&lt;/code&gt; field.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;column_type&lt;/code&gt;: specifies that the model accepts input and output columns of complex types. When imported into the database, the model must make predictions using the &lt;a href=&#34;../../../../../en/sql-reference/functions/ml-functions/transformation-functions/predict-tensorflow-scalar/#&#34;&gt;PREDICT_TENSORFLOW_SCALAR&lt;/a&gt; function.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;input_tensors&lt;/code&gt; and &lt;code&gt;output_tensors&lt;/code&gt;: the descriptions of the input and output tensors in the TensorFlow graph. Each of these fields include the following sub-fields:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;name&lt;/code&gt;: the name of the tensor for which information is listed. The name is in the format of &lt;em&gt;&lt;code&gt;operation:tensor-number&lt;/code&gt;&lt;/em&gt;, where &lt;em&gt;&lt;code&gt;operation&lt;/code&gt;&lt;/em&gt; is the operation that contains the tensor and &lt;em&gt;&lt;code&gt;tensor-number&lt;/code&gt;&lt;/em&gt; is the index of the tensor under the given operation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;data_type&lt;/code&gt;: the data type of the elements in the input or output tensor, one of the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;TF_FLOAT (default)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_DOUBLE&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT8&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT16&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT32&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;TF_INT64&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;dims&lt;/code&gt;: the dimensions of the tensor. Each input/output tensor is contained in a 1D &lt;a href=&#34;../../../../../en/sql-reference/data-types/complex-types/array/#&#34;&gt;ARRAY&lt;/a&gt; in the input/output &lt;a href=&#34;../../../../../en/sql-reference/data-types/complex-types/row/#&#34;&gt;ROW&lt;/a&gt; column.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/#&#34;&gt;TensorFlow models&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../../en/data-analysis/ml-predictive-analytics/using-external-models-with/tensorflow-models/tensorflow-example/#&#34;&gt;TensorFlow example&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
