def _sum_rows(x):
    'Returns a vector summing up each row of the matrix x.'
    cols = array_ops.shape(x)[1]
    ones_shape = array_ops.pack([cols, 1])
    ones = array_ops.ones(ones_shape, x.dtype)
    return array_ops.reshape(math_ops.matmul(x, ones), [(- 1)])
Returns a vector summing up each row of the matrix x.
def _sum_rows(x):
    
    cols = array_ops.shape(x)[1]
    ones_shape = array_ops.pack([cols, 1])
    ones = array_ops.ones(ones_shape, x.dtype)
    return array_ops.reshape(math_ops.matmul(x, ones), [(- 1)])