MCPcopy Create free account
hub / github.com/OpenDriveLab/ReSim / count_params

Function count_params

sat/vae_modules/cp_enc_dec.py:717–721  ·  view source on GitHub ↗
(model, verbose=False)

Source from the content-addressed store, hash-verified

715
716
717def count_params(model, verbose=False):
718 total_params = sum(p.numel() for p in model.parameters())
719 if verbose:
720 print(f'{model.__class__.__name__} has {total_params * 1.e-6:.2f} M params')
721 return total_params
722
723# * ContextParallelEncoder3D has 92.22 M params.
724class ContextParallelEncoder3D(nn.Module):

Callers 2

__init__Method · 0.70
__init__Method · 0.70

Calls 2

parametersMethod · 0.80
printFunction · 0.50

Tested by

no test coverage detected