Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@sy.func2plan(args_shape=[(1,)])
def inc2(x):
return x + 1
@sy.func2plan(args_shape=[(1,)])
def inc3(x):
return x + 1
@sy.func2plan(args_shape=[(1,)], state=(th.tensor([1.0]),))
def foo(x, state):
(bias,) = state.read()
x = x * 2
return x + bias
@sy.func2plan(args_shape=[(1,)])
def plan_abs(data):
return data.abs()
@sy.func2plan(args_shape=[(1,)], state=(th.tensor([1.0]),))
def plan(x, state):
(bias,) = state.read()
return x + bias
@sy.func2plan(args_shape=[(1,)])
def inc2(x):
return x + 1
@sy.func2plan()
def plan_double(data):
return -2 * data
@sy.func2plan(args_shape=[(1, -20)])
def _(data):
return data # pragma: no cover