Below is a simple usage exampleimport cvxpy as cp import torch from cvxpylayers.torch import CvxpyLayer x = cp.Variable(pos=True) y = cp.Variable(pos=True) z = cp.Variable(pos=True) a = cp.Parameter(pos=True, value=2.) b = cp.Parameter(pos=True, value=1.) c = cp.Parameter(...
added tqdm and resource allocation example sbarrattcommitted e686661 Commits on Jun 5, 2020 Add notebooks accompanying the paper Learning Convex Optimization Models akshaykacommitted c42cfba Commits on Jun 3, 2020 v0.1.4 akshaykacommitted ef431de Use CVXPY's dims to solver dict function in ...
One can pass arguments to both SCS and ECOS by adding the argument as a key-value pair in thesolver_argsargument. For example, to increase the tolerance of SCS to1e-8one would write: layer(*parameters, solver_args={"eps": 1e-8}) ...