टेंसरफ़्लो:: ऑप्स:: गतिशील सिलाई
#include <data_flow_ops.h> data टेंसर से मानों को एक टेंसर में इंटरलीव करें।
सारांश
एक मर्ज किया हुआ टेंसर इस प्रकार बनाता है
merged[indices[m][i, ..., j], ...] = data[m][i, ..., j, ...]
 उदाहरण के लिए, यदि प्रत्येक indices[m] अदिश या सदिश है, तो हमारे पास है 
# Scalar indices: merged[indices[m], ...] = data[m][...]
# Vector indices: merged[indices[m][i], ...] = data[m][i, ...]
 प्रत्येक data[i].shape संबंधित indices[i].shape से शुरू होना चाहिए, और बाकी data[i].shape स्थिर wrt i होना चाहिए। अर्थात्, हमारे पास data[i].shape = indices[i].shape + constant होना चाहिए। इस constant के संदर्भ में, आउटपुट आकार है
merged.shape = [max(indices)] + constant
 मानों को क्रम में मर्ज किया जाता है, इसलिए यदि कोई सूचकांक दोनों indices[m][i] और indices[n][j] में (m,i) < (n,j) के लिए दिखाई देता है तो स्लाइस data[n][j] होगा मर्ज किए गए परिणाम में दिखाई दें. यदि आपको इस गारंटी की आवश्यकता नहीं है, तो ParallelDynamicStitch कुछ उपकरणों पर बेहतर प्रदर्शन कर सकता है।
उदाहरण के लिए:
    indices[0] = 6
    indices[1] = [4, 1]
    indices[2] = [[5, 2], [0, 3]]
    data[0] = [61, 62]
    data[1] = [[41, 42], [11, 12]]
    data[2] = [[[51, 52], [21, 22]], [[1, 2], [31, 32]]]
    merged = [[1, 2], [11, 12], [21, 22], [31, 32], [41, 42],
              [51, 52], [61, 62]] इस विधि का उपयोग dynamic_partition द्वारा बनाए गए विभाजनों को मर्ज करने के लिए किया जा सकता है जैसा कि निम्नलिखित उदाहरण में दिखाया गया है: 
# Apply function (increments x_i) on elements for which a certain condition # apply (x_i != -1 in this example). x=tf.constant([0.1, -1., 5.2, 4.3, -1., 7.4]) condition_mask=tf.not_equal(x,tf.constant(-1.)) partitioned_data = tf.dynamic_partition( x, tf.cast(condition_mask, tf.int32) , 2) partitioned_data[1] = partitioned_data[1] + 1.0 condition_indices = tf.dynamic_partition( tf.range(tf.shape(x)[0]), tf.cast(condition_mask, tf.int32) , 2) x = tf.dynamic_stitch(condition_indices, partitioned_data) # Here x=[1.1, -1., 6.2, 5.3, -1, 8.4], the -1. values remain # unchanged.

तर्क:
- स्कोप: एक स्कोप ऑब्जेक्ट
रिटर्न:
-  Output: मर्ज किया गया टेंसर।
| निर्माता और विध्वंसक | |
|---|---|
| DynamicStitch (const :: tensorflow::Scope & scope, :: tensorflow::InputList indices, :: tensorflow::InputList data) | 
| सार्वजनिक गुण | |
|---|---|
| merged | |
| operation | |
| सार्वजनिक समारोह | |
|---|---|
| node () const | ::tensorflow::Node * | 
| operator::tensorflow::Input () const | |
| operator::tensorflow::Output () const | |
सार्वजनिक गुण
विलय होना
::tensorflow::Output merged
संचालन
Operation operation
सार्वजनिक समारोह
गतिशील सिलाई
DynamicStitch( const ::tensorflow::Scope & scope, ::tensorflow::InputList indices, ::tensorflow::InputList data )
नोड
::tensorflow::Node * node() const
ऑपरेटर::टेन्सरफ़्लो::इनपुट
operator::tensorflow::Input() const
ऑपरेटर::टेन्सरफ़्लो::आउटपुट
operator::tensorflow::Output() const