def _initial_state(self, num_constraints): # For an AdditiveSwapRegretOptimizer, the internal state is a tensor of # shape (m+1,m+1), where m is the number of constraints, representing a # left-stochastic matrix. dimension = num_constraints + 1 # Initialize by putting all weight on the objective, and none on the # constraints. return standard_ops.concat((standard_ops.ones( (1, dimension)), standard_ops.zeros((dimension - 1, dimension))), axis=0)
def _initial_state(self, num_constraints): # For an AdditiveSwapRegretOptimizer, the internal state is a tensor of # shape (m+1,m+1), where m is the number of constraints, representing a # left-stochastic matrix. dimension = num_constraints + 1 # Initialize by putting all weight on the objective, and none on the # constraints. return standard_ops.concat((standard_ops.ones( (1, dimension)), standard_ops.zeros((dimension - 1, dimension))), axis=0)