<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 比较两个数组?

        How to compare two arrays using tensorflow?(如何使用 tensorflow 比较两个数组?)

          <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 比较两个数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  groupby multiple coords along a single dimension in xarray(在xarray中按单个维度的多个坐标分组)
                  Group by and Sum in Pandas without losing columns(Pandas中的GROUP BY AND SUM不丢失列)
                  Group by + New Column + Grab value former row based on conditionals(GROUP BY+新列+基于条件的前一行抓取值)
                  Groupby and interpolate in Pandas(PANDA中的Groupby算法和插值算法)
                  Pandas - Group Rows based on a column and replace NaN with non-null values(PANAS-基于列对行进行分组,并将NaN替换为非空值)
                  Grouping pandas DataFrame by 10 minute intervals(按10分钟间隔对 pandas 数据帧进行分组)

                    <tbody id='u97ne'></tbody>

                      <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>
                        • <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'>