hybrid-approach-to-ppfl icon indicating copy to clipboard operation
hybrid-approach-to-ppfl copied to clipboard

aggregate_params err

Open VoidR opened this issue 1 year ago • 0 comments

(hybrid) ubuntu@ubuntu-SYS-7049GP-TRTA-AI034:Workspace/hybrid-approach-to-ppfl$ python main.py Bit-length of primes: 128 Starting generation of p, q and N... Generation successful. Number of insuccesfull trials small prime test: 1330 Number of insuccesfull trials biprime test: 16 Elapsed time: 1 seconds. Traceback (most recent call last): File "Workspace/hybrid-approach-to-ppfl/main.py", line 84, in trainer.fit() File "Workspace/hybrid-approach-to-ppfl/train.py", line 72, in fit self.fit_on_batch() File "Workspace/hybrid-approach-to-ppfl/train.py", line 97, in fit_on_batch aggregate: np.ndarray = self.server.aggregate_params(encrypted_models) File "Workspace/hybrid-approach-to-ppfl/distro.py", line 72, in aggregate_params return np.mean(gradients_of_parties, axis=0) File "<array_function internals>", line 200, in mean File "/home/ubuntu/anaconda3/envs/hybrid/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 3464, in mean return _methods._mean(a, axis=axis, dtype=dtype, File "/home/ubuntu/anaconda3/envs/hybrid/lib/python3.9/site-packages/numpy/core/_methods.py", line 165, in _mean arr = asanyarray(a) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (10, 2) + inhomogeneous part.

VoidR avatar May 23 '23 13:05 VoidR