PySyft icon indicating copy to clipboard operation
PySyft copied to clipboard

TypeError in compute_q_noisy_max_approx function

Open r0cketr1kky opened this issue 6 years ago • 2 comments

Describe the bug Type error because of the subtraction between counts(which is a list) and counts[winner](which is a float).

Expected behavior The final answer to this computation should be 0.8

Screenshots Screenshot from 2020-02-25 21-50-19

Desktop (please complete the following information):

  • OS: Linux Ubuntu 16.04

Additional context Add any other context about the problem here. To solve this, there has to be a loop to iterate counts so that the correct code should be for i in range(len(counts)): counts_normalized = noise_eps * (counts[i] - counts[winner])

r0cketr1kky avatar Feb 25 '20 16:02 r0cketr1kky

Well sc should be a torch tensor, not a list.

pierrepocreau avatar Feb 25 '20 16:02 pierrepocreau

Ohh, my bad. Thank you for letting me know. You can close this issue.

On Tue, 25 Feb 2020 at 10:34 PM, Pierre Pocreau [email protected] wrote:

Well sc should be a torch tensor, not a list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OpenMined/PySyft/issues/3095?email_source=notifications&email_token=AJLQTT6DAS3DTPBGXXDDB7DREVFSFA5CNFSM4K3N3NI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEM4VNFY#issuecomment-590960279, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJLQTTYYZXE6QISVMDMCETDREVFSFANCNFSM4K3N3NIQ .

r0cketr1kky avatar Feb 25 '20 17:02 r0cketr1kky