All problems
SNR Weighting
Problem
Compute the signal-to-noise ratio implied by a cumulative alpha bar: SNR = alpha_bar / (1 - alpha_bar).
The signature is snr_weighting(alpha_bar_t).
Hint
SNR decreases monotonically as the diffusion timestep grows.
Test cases
case 1
in: [0.5]
expected: 1
case 2
in: [0.9]
expected: 9
case 3
in: [0.25]
expected: 0.3333333333
case 4
in: [0]
expected: 0
Starter codePython
def snr_weighting(alpha_bar_t):
# Your code here
pass4 test cases · run your code against them in the editor