ONNXPredict Example with tensorFlow | Vantage BYOM - 3.0 - ONNXPredict Example: tensorFlow - Teradata Vantage

Teradata Vantageā„¢ - Bring Your Own Model User Guide

Product
Teradata Vantage
Release Number
3.0
Published
May 2022
Last Update
2022-06-02
Content Type
User Guide
Publication ID
B700-1111-051K
Language
English (United States)

The tf_iris_softmax_model was created with each input variable mapped to a single input tensor. Since the names of the input tensors match column names that exist in the iris_test table you do not need to use the ModelInputFieldsMap argument and the model tensor names are automatically set to the matching column names.

select * from mldb.ONNXPredict(
    on (select * from iris_test)
    on (select * from onnx_models where model_id='tf_iris_softmax_model') DIMENSION
    using
        Accumulate('id')
) as td
;
 
 *** Query completed. 30 rows found. 2 columns returned.
 *** Total elapsed time was 1 second.
       id   json_report
---------- ---------------------------------------------------------------------
         10             {"probability":[[0.9998599,1.4007483E-4,4.8622266E-11]]}
         65             {"probability":[[3.912328E-4,0.9988294,7.793538E-4]]}
         15             {"probability":[[0.9999999,1.7266561E-7,1.2621994E-13]]}
          5             {"probability":[[0.999992,8.021199E-6,2.2980238E-12]]}
         30             {"probability":[[0.99968386,3.1617365E-4,9.13303E-11]]}
         20             {"probability":[[0.99999213,7.901898E-6,2.2734618E-12]]}
         40             {"probability":[[0.9999683,3.1726304E-5,1.782701E-11]]}
         70             {"probability":[[3.5515255E-5,0.9994023,5.62249E-4]]}
         60             {"probability":[[3.0097424E-4,0.6842745,0.3154245]]}
         80             {"probability":[[3.0982963E-4,0.9995832,1.070616E-4]]}
         45             {"probability":[[0.9997352,2.6480303E-4,1.7095797E-11]]}
         75             {"probability":[[6.3532675E-6,0.999877,1.16734125E-4]]}
        120             {"probability":[[2.2099151E-8,0.023814192,0.97618586]]}
         85             {"probability":[[1.0646227E-4,0.64747274,0.35242087]]}
        115             {"probability":[[8.84089E-12,1.13627166E-7,0.9999999]]}
         55             {"probability":[[2.3626533E-6,0.9896403,0.010357335]]}
        125             {"probability":[[5.0688627E-9,0.0036252008,0.9963748]]}
         90             {"probability":[[6.0868737E-5,0.9305012,0.06943793]]}
         95             {"probability":[[4.43892E-5,0.98495364,0.015002]]}
        100             {"probability":[[5.467016E-5,0.99671644,0.0032288947]]}
        130             {"probability":[[2.5530914E-8,0.9915139,0.008486167]]}
        135             {"probability":[[1.6936058E-7,0.55152786,0.44847193]]}
        140             {"probability":[[4.6395296E-9,0.004772966,0.995227]]}
         25          {"probability":[[0.99771667,0.0022833364,2.1570362E-11]]}
        110             {"probability":[[5.827173E-11,8.144908E-5,0.9999186]]}
        145             {"probability":[[1.7500341E-11,3.8031712E-6,0.9999962]]}
        150             {"probability":[[2.2181743E-7,0.011317454,0.9886824]]}
         35             {"probability":[[0.999882,1.17950236E-4,2.4415578E-10]]}
         50          {"probability":[[0.99997914,2.0821832E-5,3.7522135E-11]]}
        105             {"probability":[[3.3467944E-11,2.2144119E-5,0.9999778]]}