MCPcopy Create free account
hub / github.com/CERT-Lab/lora-sb / is_classifier_layer

Function is_classifier_layer

utils/misc.py:23–26  ·  view source on GitHub ↗

Check if the layer is part of classifier based on common naming patterns

(name: str)

Source from the content-addressed store, hash-verified

21 Dictionary containing parameter counts in K (1000s)
22 """
23 def is_classifier_layer(name: str) -> bool:
24 """Check if the layer is part of classifier based on common naming patterns"""
25 classifier_keywords = ['classifier', 'fc', 'linear', 'head']
26 return any(keyword in name.lower() for keyword in classifier_keywords)
27
28 total_params = 0
29 classifier_params = 0

Callers 1

count_parametersFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected