Skip to content
DeepForgeby svx
All problems
MediumComputer Visioncv-294

Reptile Update

Problem

Apply the Reptile meta-update toward a task-adapted parameter vector.

Return round(p + epsilon * (adapted - p), 4) for every parameter.

Test cases

case 1
in: [[1,0],[0.5,0.5],0.1]
expected: [0.95,0.05]
case 2
in: [[0,0],[1,1],0.5]
expected: [0.5,0.5]
case 3
in: [[2,4],[3,2],0]
expected: [2,4]
Starter codePython
def reptile_update(params, adapted, epsilon):
    # Your code here
    pass

3 test cases · run your code against them in the editor