Returns log Signal-to-Noise ratio for time step t and image size 64 eps: avoid division by zero
(t, eps=0.00001)
| 14 | |
| 15 | |
| 16 | def cosine_log_snr(t, eps=0.00001): |
| 17 | """ |
| 18 | Returns log Signal-to-Noise ratio for time step t and image size 64 |
| 19 | eps: avoid division by zero |
| 20 | """ |
| 21 | return -2 * np.log(np.tan((np.pi * t) / 2) + eps) |
| 22 | |
| 23 | |
| 24 | def shifted_cosine_log_snr(t, im_size: int, ref_size: int = 64): |
no outgoing calls
no test coverage detected