<small id='x49ao'></small><noframes id='x49ao'>

<i id='x49ao'><tr id='x49ao'><dt id='x49ao'><q id='x49ao'><span id='x49ao'><b id='x49ao'><form id='x49ao'><ins id='x49ao'></ins><ul id='x49ao'></ul><sub id='x49ao'></sub></form><legend id='x49ao'></legend><bdo id='x49ao'><pre id='x49ao'><center id='x49ao'></center></pre></bdo></b><th id='x49ao'></th></span></q></dt></tr></i><div id='x49ao'><tfoot id='x49ao'></tfoot><dl id='x49ao'><fieldset id='x49ao'></fieldset></dl></div>

      1. <tfoot id='x49ao'></tfoot>
          <bdo id='x49ao'></bdo><ul id='x49ao'></ul>
      2. <legend id='x49ao'><style id='x49ao'><dir id='x49ao'><q id='x49ao'></q></dir></style></legend>
      3. 如何使用 tensorflow 比较两个数组?

        时间:2023-11-07

          <tbody id='kCO11'></tbody>

      4. <i id='kCO11'><tr id='kCO11'><dt id='kCO11'><q id='kCO11'><span id='kCO11'><b id='kCO11'><form id='kCO11'><ins id='kCO11'></ins><ul id='kCO11'></ul><sub id='kCO11'></sub></form><legend id='kCO11'></legend><bdo id='kCO11'><pre id='kCO11'><center id='kCO11'></center></pre></bdo></b><th id='kCO11'></th></span></q></dt></tr></i><div id='kCO11'><tfoot id='kCO11'></tfoot><dl id='kCO11'><fieldset id='kCO11'></fieldset></dl></div>

                <small id='kCO11'></small><noframes id='kCO11'>

                  <bdo id='kCO11'></bdo><ul id='kCO11'></ul>
                  <tfoot id='kCO11'></tfoot>
                • <legend id='kCO11'><style id='kCO11'><dir id='kCO11'><q id='kCO11'></q></dir></style></legend>
                  本文介绍了如何使用 tensorflow 比较两个数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  I need to compare two arrays and get either true or false,not elementwise result. My code is

                  X = tf.constant([0.05, 0.10], dtype=tf.float32, shape=[1, 2])
                  y = tf.constant([0.01, 0.99], dtype=tf.float32, shape=[1, 2])
                  
                  equality = tf.equal(X, y)
                  

                  prints [False, False]

                  my requirement is to get true or false, not an array.

                  解决方案

                  Assuming that you want to return False if any of your values are not equal then you can use the reduce_all operation:

                  equality = tf.math.reduce_all(tf.equal(X, y))
                  

                  这篇关于如何使用 tensorflow 比较两个数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:尝试比较两个 csv 文件并将差异写入输出 下一篇:比较两个文本文件以找出差异并将它们输出到新的文本文件

                  相关文章

                    <tfoot id='u97ne'></tfoot>

                      <i id='u97ne'><tr id='u97ne'><dt id='u97ne'><q id='u97ne'><span id='u97ne'><b id='u97ne'><form id='u97ne'><ins id='u97ne'></ins><ul id='u97ne'></ul><sub id='u97ne'></sub></form><legend id='u97ne'></legend><bdo id='u97ne'><pre id='u97ne'><center id='u97ne'></center></pre></bdo></b><th id='u97ne'></th></span></q></dt></tr></i><div id='u97ne'><tfoot id='u97ne'></tfoot><dl id='u97ne'><fieldset id='u97ne'></fieldset></dl></div>
                    1. <legend id='u97ne'><style id='u97ne'><dir id='u97ne'><q id='u97ne'></q></dir></style></legend>
                        <bdo id='u97ne'></bdo><ul id='u97ne'></ul>

                      <small id='u97ne'></small><noframes id='u97ne'>