Skip to content

Commit b6499cf

Browse files
committed
Fixed issue with NID
1 parent ecdab0f commit b6499cf

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

Compiler/decision_tree_optimized.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,9 @@ def train_layer(self, k):
250250
b = self.ApplyTests(x, a, t)
251251
p = SortPerm(g.get_vector().bit_not())
252252
self.nids[k], self.aids[k], self.thresholds[k]= FormatLayer_without_crop(g[:], NID, a, t, debug=self.debug)
253+
self.g, self.x, self.y, self.NID, self.pis = self.UpdateState(g, x, y, pis, NID, b, k)
253254

254-
@if_e(k < (len(self.nids)-1))
255-
def _():
256-
self.g, self.x, self.y, self.NID, self.pis = self.UpdateState(g, x, y, pis, NID, b, k)
257-
@else_
255+
@if_(k >= (len(self.nids)-1))
258256
def _():
259257
self.label = Array.create_from(s0 < s1)
260258

0 commit comments

Comments
 (0)