QuizGenerator 0.4.2__py3-none-any.whl → 0.4.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -222,6 +222,4 @@ class WeightCounting_RNN(WeightCounting):
222
222
  return model, ["units", "return_sequences"]
223
223
 
224
224
 
225
- @QuestionRegistry.register()
226
- class ConvolutionCalculation(Question):
227
- pass
225
+ # ConvolutionCalculation is implemented in cnns.py
@@ -883,11 +883,18 @@ class MomentumOptimizerQuestion(Question, TableQuestionMixin, BodyTemplatesMixin
883
883
  ))
884
884
 
885
885
  # Show calculation for each component
886
+ digits = Answer.DEFAULT_ROUNDING_DIGITS
886
887
  for i in range(self.num_variables):
887
888
  var_name = f"x_{i}"
889
+ # Round all intermediate values to avoid floating point precision issues
890
+ beta_times_v = round(self.momentum_beta * self.prev_velocity[i], digits)
891
+ one_minus_beta = round(1 - self.momentum_beta, digits)
892
+ one_minus_beta_times_grad = round((1 - self.momentum_beta) * self.gradients[i], digits)
893
+
888
894
  explanation.add_element(ContentAST.Equation(
889
- f"v'[{i}] = {self.momentum_beta} \\times {self.prev_velocity[i]:.2f} + "
890
- f"{1 - self.momentum_beta} \\times {self.gradients[i]:.4f} = {self.new_velocity[i]:.4f}",
895
+ f"v'[{i}] = {self.momentum_beta} \\times {self.prev_velocity[i]:.{digits}f} + "
896
+ f"{one_minus_beta:.{digits}f} \\times {self.gradients[i]:.{digits}f} = "
897
+ f"{beta_times_v:.{digits}f} + {one_minus_beta_times_grad:.{digits}f} = {self.new_velocity[i]:.{digits}f}",
891
898
  inline=False
892
899
  ))
893
900
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QuizGenerator
3
- Version: 0.4.2
3
+ Version: 0.4.4
4
4
  Summary: Generate randomized quiz questions for Canvas LMS and PDF exams
5
5
  Project-URL: Homepage, https://github.com/OtterDen-Lab/QuizGenerator
6
6
  Project-URL: Documentation, https://github.com/OtterDen-Lab/QuizGenerator/tree/main/documentation
@@ -40,13 +40,13 @@ QuizGenerator/premade_questions/cst463/models/cnns.py,sha256=M0_9wlPhQICje1UdwIb
40
40
  QuizGenerator/premade_questions/cst463/models/matrices.py,sha256=H61_8cF1DGCt4Z4Ssoi4SMClf6tD5wHkOqY5bMdsSt4,699
41
41
  QuizGenerator/premade_questions/cst463/models/rnns.py,sha256=-tXeGgqPkctBBUy4RvEPqhv2kfPqoyO2wk-lNJLNWmY,6697
42
42
  QuizGenerator/premade_questions/cst463/models/text.py,sha256=bUiDIzOBEzilUKQjm2yO9ufcvJGY6Gt3qfeNP9UZOrc,6400
43
- QuizGenerator/premade_questions/cst463/models/weight_counting.py,sha256=acygK-MobvdmwS4UYKVVL4Ey59M1qmq8dITWOT6V-aI,6793
43
+ QuizGenerator/premade_questions/cst463/models/weight_counting.py,sha256=k_FVS3JYP8MUmghHzpSR5DKJ973TGRa43MRMs3GzSTo,6768
44
44
  QuizGenerator/premade_questions/cst463/neural-network-basics/__init__.py,sha256=pmyCezO-20AFEQC6MR7KnAsaU9TcgZYsGQOMVkRZ-U8,149
45
45
  QuizGenerator/premade_questions/cst463/neural-network-basics/neural_network_questions.py,sha256=gd5zI-6gmXUiK8GaCOCq0IlOwDg4YS0NlOdoN9v_flo,44810
46
46
  QuizGenerator/premade_questions/cst463/tensorflow-intro/__init__.py,sha256=G1gEHtG4KakYgi8ZXSYYhX6bQRtnm2tZVGx36d63Nmo,173
47
- QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py,sha256=dPn8Sj0yk4m02np62esMKZ7CvcljhYq3Tq51nY9aJnA,29781
48
- quizgenerator-0.4.2.dist-info/METADATA,sha256=DDpI82uz-oqvKRYLPgF8O6-Cuv6g39So65_I82DBxFk,7212
49
- quizgenerator-0.4.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
50
- quizgenerator-0.4.2.dist-info/entry_points.txt,sha256=aOIdRdw26xY8HkxOoKHBnUPe2mwGv5Ti3U1zojb6zxQ,98
51
- quizgenerator-0.4.2.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
52
- quizgenerator-0.4.2.dist-info/RECORD,,
47
+ QuizGenerator/premade_questions/cst463/tensorflow-intro/tensorflow_questions.py,sha256=z2eMjDFQnyjoKglJ4cuZKWFmN9n3Dt7UTwuMLhriWLM,30244
48
+ quizgenerator-0.4.4.dist-info/METADATA,sha256=sxm0mKRsHvLNX99ZFRBcjpZnQ6puZ4WZf-e8JgjmafE,7212
49
+ quizgenerator-0.4.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
50
+ quizgenerator-0.4.4.dist-info/entry_points.txt,sha256=aOIdRdw26xY8HkxOoKHBnUPe2mwGv5Ti3U1zojb6zxQ,98
51
+ quizgenerator-0.4.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
52
+ quizgenerator-0.4.4.dist-info/RECORD,,