Generate new tensorflow tensor according to the element index of original tensor
You should just make your label (y) in your reduced sum format (i.e. 3 bits), and train to that label.  The neural net should be smart enough to adjust the weights to imitate your reduce_sum logic.
I have a question about tensorflow tensor.
If I have a NeuralNet like y=xw+b as an example.
then x is placeholder([7,7] dims), w is Variable([7,1]) and b is Variable([1,1])
So, y is tensorflow tensor with [7,1] dims.
then, in this case. can I make a new tensor like
new_y = [tf.reduce_sum(y[0:3]), tf.reduce_sum(y[3:5]), tf.reduce_sum(y[5:])] 
and use it for training step?
If possible, how can I make it?