How to restrict Tensorflow's weights tensor has same row variable? means under updating,still keep same

Multi tool use


How to restrict Tensorflow's weights tensor has same row variable? means under updating,still keep same
I have a stupid question, but I don't know how to slove it.
I have a neural network designed by tensorflow, it has several weights matrix .
My output layer is a fully connected network, and it has a 2D weights matrix W.
assume W is a 3x3 matrix, my algorithm need W's row value are same. means under the updating procedure, W changes to W', but each row's elements changed simultaneously and keeps same value:
W= W'=
[[ x,x,x], [[ x',x',x'],
[ y,y,y], -> [ y',y',y'],
[ z,z,z]] [ z',z',z']]
means after each training step, x and y,z changes to x',y',z'. but all of 1st row's elements are x'. For 2nd and 3rd row, the rule are same.
So, how do define or set this W matrix (or 2D-tensor) in tensorflow ? thank u.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.