You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
469 B
15 lines
469 B
import sys
|
|
import os
|
|
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
|
|
import torch
|
|
from ltr.models.backbone.resnet import resnet50
|
|
|
|
# Instantiate the model
|
|
model = resnet50()
|
|
model.eval()
|
|
|
|
# Print BN1 parameters and stats
|
|
bn1 = model.bn1
|
|
for param in ['weight', 'bias', 'running_mean', 'running_var']:
|
|
t = getattr(bn1, param)
|
|
print(f'bn1_{param}: shape={t.shape}, dtype={t.dtype}, device={t.device}, first5={t.flatten()[:5]}')
|