Hi,
I'm trying to run a horizontal_sum on a vector of values and return one single sum (or a vector that has that sum in every position) by following your std test.
fromevaimportEvaProgram, Input, Outputfromeva.ckksimportCKKSCompilerfromeva.sealimportgenerate_keysfromeva.std.numericimporthorizontal_sumvec_sz=16poly=EvaProgram('poly', vec_size=vec_sz)
withpoly:
a=Input('a')
b=Input('b')
diff=a-bsq_diff=diff*diffdiff=horizontal_sum(sq_diff)
Output('diff', diff)
poly.set_input_scales(40)
poly.set_output_ranges(10)
a= [i%10foriinrange(vec_sz)]
b= [i%5foriinrange(vec_sz)]
compiler=CKKSCompiler()
compiled_poly, params, signature=compiler.compile(poly)
public_ctx, secret_ctx=generate_keys(params)
inputs= {'a': a, 'b': b}
encInputs=public_ctx.encrypt(inputs, signature)
encOutputs=public_ctx.execute(poly, encInputs)
outputs=secret_ctx.decrypt(encOutputs, signature)
print(outputs)I'm getting the following error:
Traceback (most recent call last):
File "std_test.py", line 29, in <module>
encOutputs = public_ctx.execute(poly, encInputs)
ValueError: encrypted size must be 2
I might be missing something obvious, but it seems that this is very similar to the std example.
cc: cgouert (@cgouert)
Hi,
I'm trying to run a
horizontal_sumon a vector of values and return one single sum (or a vector that has that sum in every position) by following your std test.I'm getting the following error:
I might be missing something obvious, but it seems that this is very similar to the
stdexample.cc: cgouert (@cgouert)