Hey,
Love the repo, but I have an issue, whenever I run it it seems to get stuck at the last two lines of Main.py it does not show an error, but after a while i press force it to stop and its stuck at the same line every time. I run it on less epochs than in your file (1-2) just for testing purposes. My hyperparameters look like this:
def __init__(self):
self.batchsize = 64
self.test_batchsize = 10
self.epochs = **1**
self.student_epochs = **1**
self.lr = 0.01
self.momentum = 0.5
self.no_cuda = False
self.seed = 1
self.log_interval = 30
self.n_teachers = **1**
self.save_model = **True**
Last four lines of code look like this:
counts_lol = torch.stack(counts).contiguous().view(**1**, 10000)
predict_lol = torch.tensor(predict).view(10000)
data_dep_eps, data_ind_eps = teacher.analyze(counts_lol, predict_lol, moments=20)
print("Epsilon: ", teacher.analyze(counts_lol, predict_lol))
And it seems that my file is stuck at:
Traceback (most recent call last):
File "main.py", line 91, in <module>
#data_dep_eps, data_ind_eps = teacher.analyze(counts_lol, predict_lol, moments=20)
File "C:\Users\Koen\PycharmProjects\pate-g\PATE\Teacher.py", line 176, in analyze
preds, indices, noise_eps=0.1, delta=self.epsilon, moments=moments, beta=0.09
File "C:\Users\Koen\Anaconda3\envs\pysyft\lib\site-packages\syft-0.2.0a2-py3.7.egg\syft\frameworks\torch\differential_privacy\pate.py", line 484, in perform_analysis_torch
File "C:\Users\Koen\Anaconda3\envs\pysyft\lib\site-packages\syft-0.2.0a2-py3.7.egg\syft\frameworks\torch\differential_privacy\pate.py", line 484, in <listcomp>
File "C:\Users\Koen\Anaconda3\envs\pysyft\lib\site-packages\syft-0.2.0a2-py3.7.egg\syft\frameworks\torch\differential_privacy\pate.py", line 379, in logmgf_from_counts_torch
File "C:\Users\Koen\Anaconda3\envs\pysyft\lib\site-packages\syft-0.2.0a2-py3.7.egg\syft\frameworks\torch\differential_privacy\pate.py", line 354, in compute_q_noisy_max_torch
File "C:\Users\Koen\Anaconda3\envs\pysyft\lib\site-packages\syft-0.2.0a2-py3.7.egg\syft\frameworks\torch\differential_privacy\pate.py", line 294, in tensors_to_literals
File "C:\Users\Koen\Anaconda3\envs\pysyft\lib\site-packages\torch\tensor.py", line 427, in <lambda>
return iter(imap(lambda i: self[i], range(self.size(0))))
Would you have any idea what I'm doing wrong here? I'm hesitant to run it for 1000 epochs as it would take a lot of time and I might still get stuck at the same point.
I am very curious to what the epsilon is and want to play around to see what the actual loss of accuracy would be with my own datasets.
Thanks in advance!