Commit d106fe7
Fix confusing weight loading logging for legacy models
When loading backbone/head weights separately from a legacy .h5 file,
the logging showed confusing counts like "22/26 loaded" instead of
"22/22" because it used total legacy weights as the denominator.
Changes:
- Use PyTorch model parameters as denominator instead of total legacy weights
- Change "No matching PyTorch parameter" messages from warning to debug
level since mismatches are expected when loading components separately
- Add debug message showing count of unmatched legacy weights
Before: "Successfully mapped 22/26 legacy weights to PyTorch parameters"
After: "Successfully mapped 22/22 PyTorch parameters from legacy weights"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 699a8e2 commit d106fe7
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
275 | 280 | | |
276 | 281 | | |
277 | 282 | | |
| |||
0 commit comments