Utils
float_time_to_index(time, num_time_steps)
Convert a float time value to a time index.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
time
|
Tensor
|
A tensor of float time values in the range [0, 1]. |
required |
num_time_steps
|
int
|
The number of discrete time steps. |
required |
Returns:
Type | Description |
---|---|
Tensor
|
torch.Tensor: A tensor of time indices corresponding to the input float time values. |
Source code in bionemo/moco/distributions/time/utils.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
|