All problems
EMA Teacher Update
Problem
Update a mean-teacher weight with the exponential moving average rule.
Return round(decay * teacher + (1 - decay) * student, 4).
Test cases
case 1
in: [1,0,0.9]
expected: 0.9
case 2
in: [0.5,0.5,0.99]
expected: 0.5
case 3
in: [0.2,0.8,0]
expected: 0.8
Starter codePython
def ema_update(teacher, student, decay):
# Your code here
pass3 test cases · run your code against them in the editor