mirror of
https://github.com/xiph/opus.git
synced 2025-05-18 09:28:30 +00:00
8 lines
No EOL
257 B
Python
8 lines
No EOL
257 B
Python
|
|
|
|
def _conv1d_flop_count(layer, rate):
|
|
return 2 * ((layer.in_channels + 1) * layer.out_channels * rate / layer.stride[0] ) * layer.kernel_size[0]
|
|
|
|
|
|
def _dense_flop_count(layer, rate):
|
|
return 2 * ((layer.in_features + 1) * layer.out_features * rate ) |