scirex.utils
Small helpers.
Parameter counting
One complex number counts as two parameters.
count_model_params
count_tensor_params
Returns the number of parameters (elements) in a single tensor, optionally, along certain dimensions only
Args:
| Name | Type | Description | Default |
|---|---|---|---|
tensor
|
Array
|
|
|
dims
|
int list or None
|
if not None, the dimensions to consider when counting the number of parameters (elements) |
is None
|
Notes
One complex number is counted as two parameters (we count real and imaginary parts)'