alstrup commited on
Commit
5052e8b
·
verified ·
1 Parent(s): 2c278bf

tier-4 SRT member: model.py

Browse files
Files changed (1) hide show
  1. model.py +10 -2
model.py CHANGED
@@ -58,6 +58,11 @@ class ModMulBP(ModularMultiplicationModel):
58
  self.scratch = bool(ckpt.get("scratch", False))
59
  self.cursor = bool(ckpt.get("cursor", False))
60
  self.subpad = bool(ckpt.get("subpad", False))
 
 
 
 
 
61
  self.regime = self.base ** self.W
62
  else:
63
  self.regime = 10 ** self.W
@@ -94,9 +99,12 @@ class ModMulBP(ModularMultiplicationModel):
94
  if self.composed:
95
  prompt_fn = lambda p, x, y, W: cenc.prompt_str( # noqa: E731
96
  x, y, p, W, self.base, self.subpad)
97
- n_gen = cenc.gen_len(self.W, self.scratch, self.cursor, self.subpad)
 
 
98
  decode_fn = lambda g, W: cenc.decode_answer( # noqa: E731
99
- g, W, self.base, self.scratch, self.cursor, self.subpad)
 
100
  else:
101
  cot = self.scratchpad or self.school
102
  prompt_fn = enc.prompt_str_sp if cot else enc.prompt_str
 
58
  self.scratch = bool(ckpt.get("scratch", False))
59
  self.cursor = bool(ckpt.get("cursor", False))
60
  self.subpad = bool(ckpt.get("subpad", False))
61
+ self.stepidx = bool(ckpt.get("stepidx", False))
62
+ self.skiptriv = bool(ckpt.get("skiptriv", False))
63
+ self.subnum = bool(ckpt.get("subnum", False))
64
+ self.bemit = bool(ckpt.get("bemit", False))
65
+ self.srt = bool(ckpt.get("srt", False))
66
  self.regime = self.base ** self.W
67
  else:
68
  self.regime = 10 ** self.W
 
99
  if self.composed:
100
  prompt_fn = lambda p, x, y, W: cenc.prompt_str( # noqa: E731
101
  x, y, p, W, self.base, self.subpad)
102
+ n_gen = cenc.gen_len(self.W, self.scratch, self.cursor, self.subpad,
103
+ self.stepidx, self.skiptriv, self.subnum,
104
+ self.bemit, self.srt)
105
  decode_fn = lambda g, W: cenc.decode_answer( # noqa: E731
106
+ g, W, self.base, self.scratch, self.cursor, self.subpad,
107
+ self.stepidx, self.skiptriv, self.subnum, self.bemit, self.srt)
108
  else:
109
  cot = self.scratchpad or self.school
110
  prompt_fn = enc.prompt_str_sp if cot else enc.prompt_str