Extensions
Last updated
Last updated
Concrete supports native Python and NumPy operations as much as possible, but not everything is available in Python or NumPy. So, we provide some extensions ourselves to improve your experience.
Allows you to wrap any univariate function into a single table lookup:
The wrapped function:
shouldn't have any side effects (e.g., no modification of global state)
should be deterministic (e.g., no random numbers)
should have the same output shape as its input (i.e., output.shape
should be the same with input.shape
)
each output element should correspond to a single input element (e.g., output[0]
should only depend on input[0]
)
If any of these constraints are violated, the outcome is undefined.
Only 2D convolutions without padding and with one groups are supported for the time being.
Only 2D maxpooling without padding up to 15-bits is supported for the time being.
Allows you to create encrypted arrays:
Only scalars can be used to create arrays for the time being.
Allows you to create encrypted scalar zero:
Allows you to create encrypted tensor of zeros:
Allows you to create encrypted scalar one:
Allows you to create encrypted tensor of ones:
Allows you to perform a convolution operation, with the same semantic of :
Allows you to perform a maxpool operation, with the same semantic of :