Skip to content

Commit

Permalink
fix TeacherUpdate enqueue_teacher logic *again* ?
Browse files Browse the repository at this point in the history
  • Loading branch information
FrenchKrab committed Apr 4, 2022
1 parent 78ba279 commit 94ea635
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,9 @@ def __init__(
self.teacher_weights_cache: OrderedDict[str, torch.Tensor] = None

def enqueue_teacher(self, teacher: OrderedDict[str, torch.Tensor]):
self.last_weights.append(teacher)
if len(self.last_weights) >= self.average_of:
self.last_weights.pop(0)
self.last_weights.append(teacher)

def get_updated_weights(
self,
Expand Down

0 comments on commit 94ea635

Please sign in to comment.