'Tensorflow how to assign the row of sparsetensor by values(matrix)

The origin input is [a0,b0,a1,c0..], then they will be send to three different nets according to their type. NetA will produce outputA [A0,A1,..], NetB will get outputB [B0,..], NetC will get outputC [C0,..]. Ai,Bi,Ci are both array which has same length N.In tensorflow, how can I combine the results outputA, outputB, outputC to final_output which has the same order of origin input. OutputA sample values are:[[0.3,0.4,0.2],[[0.2,0.1,0.3]], outputB sample value is [[0.1,0.2,0.5]],outputC sample value is [[0.8,0.2,0.4]]. The desired final_result should be [[0.3,0.4,0.2],[0.1,0.2,0.5],[0.2,0.1,0.3],[0.8,0.2,0.4]]. Tensorflow sparsetensor can't support assign the whole row by values.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source