When multigrid training uses a fewer number of frames, we randomly increase the sampling rate so that some clips cover the original span.
(long_cycle_sampling_rate, sampling_rate)
| 369 | |
| 370 | |
| 371 | def get_random_sampling_rate(long_cycle_sampling_rate, sampling_rate): |
| 372 | """ |
| 373 | When multigrid training uses a fewer number of frames, we randomly |
| 374 | increase the sampling rate so that some clips cover the original span. |
| 375 | """ |
| 376 | if long_cycle_sampling_rate > 0: |
| 377 | assert long_cycle_sampling_rate >= sampling_rate |
| 378 | return random.randint(sampling_rate, long_cycle_sampling_rate) |
| 379 | else: |
| 380 | return sampling_rate |
| 381 | |
| 382 | |
| 383 | def revert_tensor_normalize(tensor, mean, std): |
nothing calls this directly
no outgoing calls
no test coverage detected