Closed dxoigmn closed 3 weeks ago
Hi @dxoigmn, thank you for bringing this issue to our attention. I'm pleased to inform you that we have fixed the bug and released an updated version of the tutorials. You can check the shadow_metric.ipynb and avg_loss_training_alg.ipynb files for the latest version.
If you have any questions or feedback, please let us know. Thank you for your support!
The PyTorch model in shadow_metric.ipynb uses
nn.CrossEntropyLoss
, which expects unnormalized logits. However, the model outs probabilities due to the use ofnn.Softmax
. This causes the model to not achieve 100% accuracy on the training set.Additionally, criterions in PyTorch typically take arguments in the order of
logits, targets
. However, the code providestargets, logits
. This, however, is not a functional concern because targets contains class probabilities (rather than class indices). It will probably become an issue once the bug above is fixed.Both of these issues also exist in avg_loss_training_algo.ipynb