Round down to the nearest multiple¤
Round down to the nearest multiple.
round_to_multiple(value, multiple)
¤
Round down to the nearest multiple.
Helper function for creating default values.
Example
round_to_multiple(1023, 100) 1000
Parameters:
Name | Type | Description | Default |
---|---|---|---|
value |
int | float
|
The value to round down. |
required |
multiple |
int
|
The multiple to round down to. |
required |
Returns:
Type | Description |
---|---|
int
|
The value rounded down to the nearest multiple. |
Raises:
Type | Description |
---|---|
ValueError
|
If |
Source code in sparse_autoencoder/train/utils/round_down.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
|