-
Notifications
You must be signed in to change notification settings - Fork 345
Couple of errors in eth_mnist.py #479
Description
Hi, I found the following errors in the file eth_mnist.py:
-
The initialization of the variable labels, on line 171, should be inside the for loop in line 172. Otherwise, when you use more than one epoch, you will carry an additional element in labels from the previous epoch, and eventually, an error would raise in lines 209 and 214, as label_tensor and all_activity_pred or proportion_pred tensors will have different sizes.
-
In the testing part, there is an error regarding the mean calculation on lines 352 and 353. The problem is that you are dividing by n_test, but because of the condition of the if, in line 315, is ">", instead of doing n_test evaluations, you are doing n_test+1, so the mean calculation is not correct. Given that you are using directly n_test, it would suggest changing the ">" by an ">=". Another option would be to divide by n_test+1, meaning that n_test starts from 0, which makes less sense for me.