MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / count_num_layers

Function count_num_layers

models/transformer/utils.py:156–161  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

154 }
155
156 def count_num_layers():
157 layers = [
158 k for k in state_dict.keys()
159 if 'transformer_blocks' in k and 'attn1.norm_q.weight' in k
160 ]
161 return len(layers)
162
163 num_layers = count_num_layers()
164 inner_dim, in_channels, patch_size1, patch_size2 = state_dict[

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected