Skip to content
DeepForgeby svx
All problems
EasyComputer Visioncv-391

DINO Teacher Temperature

Problem

Warm up the DINO teacher temperature.

The temperature grows linearly from start to end over warmup_steps and stays at end afterwards. Return the temperature at the given step rounded to 4 decimal places.

Hint

The warmup keeps the teacher soft early in training.

Test cases

case 1
in: [0,30,0.04,0.07]
expected: 0.04
case 2
in: [15,30,0.04,0.07]
expected: 0.055
case 3
in: [30,30,0.04,0.07]
expected: 0.07
case 4
in: [60,30,0.04,0.07]
expected: 0.07
Starter codePython
def dino_teacher_temp(step, warmup_steps, start, end):
    # Your code here
    pass

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