<ruby id="xh9j9"></ruby>

<th id="xh9j9"></th>

    1. <rp id="xh9j9"><object id="xh9j9"></object></rp>
      <rp id="xh9j9"></rp>

        首頁 > 編程學習 > tf.tile()

        tf.tile()

        發布時間:8/16/2022 8:52:03 AM

        tile() 平鋪之意,用于在同一維度上的復制

        tile(
            input,     #輸入
            multiples,  #同一維度上復制的次數
            name=None
        )

         

        with tf.Graph().as_default():
            a = tf.constant([1,2],name='a') 
            b = tf.tile(a,[3])
            sess = tf.Session()
            print(sess.run(b))
        對[1,2]的同一維度上復制3次,multiples參數維度與input維度應一致, 結果如下:
        [1 2 1 2 1 2]
        with tf.Graph().as_default():
            a = tf.constant([[1,2],[3,4]],name='a')   
            b = tf.tile(a,[2,3])
            sess = tf.Session()
            print(sess.run(b))
        輸出:
        [[1 2 1 2 1 2]
         [3 4 3 4 3 4]
         [1 2 1 2 1 2]
         [3 4 3 4 3 4]]

         

        Copyright ? 2010-2022 wtld.cn 版權所有 |關于我們| 聯系方式
        日本精品人妻

        <ruby id="xh9j9"></ruby>

        <th id="xh9j9"></th>

        1. <rp id="xh9j9"><object id="xh9j9"></object></rp>
          <rp id="xh9j9"></rp>