- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.1k
 
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
These models return feature_info.channels() is not match
ecaresnet50d_prunedecaresnet101d_prunedefficientnet_b1_prunedefficientnet_b2_prunedefficientnet_b3_pruned
To Reproduce
import timm
import torch
model_list = [
    ["ecaresnet50d_pruned", 224],
    ["ecaresnet101d_pruned", 224],
    ["efficientnet_b1_pruned", 224],
    ["efficientnet_b2_pruned", 224],
    ["efficientnet_b3_pruned", 224]
]
if __name__ == "__main__":
    for model_name, img_size in model_list:
        x = torch.rand(1, 3, 224, 224)
        model = timm.create_model(f"{model_name}", features_only=True).eval()
        y = model(x)
        print(model_name)
        print(f"    Feature shape: {[f.detach().numpy().shape[1:] for f in y]}")
        print(f"    Feature channels: {model.feature_info.channels()}")
        print()ecaresnet50d_pruned
    Feature shape: [(64, 112, 112), (19, 56, 56), (171, 28, 28), (818, 14, 14), (2022, 7, 7)]
    Feature channels: [64, 256, 512, 1024, 2048]
ecaresnet101d_pruned
    Feature shape: [(64, 112, 112), (26, 56, 56), (142, 28, 28), (278, 14, 14), (2042, 7, 7)]
    Feature channels: [64, 256, 512, 1024, 2048]
efficientnet_b1_pruned
    Feature shape: [(16, 112, 112), (12, 56, 56), (35, 28, 28), (67, 14, 14), (320, 7, 7)]
    Feature channels: [16, 24, 40, 112, 320]
efficientnet_b2_pruned
    Feature shape: [(16, 112, 112), (17, 56, 56), (42, 28, 28), (116, 14, 14), (352, 7, 7)]
    Feature channels: [16, 24, 48, 120, 352]
efficientnet_b3_pruned
    Feature shape: [(24, 112, 112), (12, 56, 56), (40, 28, 28), (120, 14, 14), (384, 7, 7)]
    Feature channels: [24, 32, 48, 136, 384]Expected behavior
ecaresnet50d_prunedfeature channels(64, 19, 171, 818, 2022)ecaresnet101d_prunedfeature channels(64, 26, 142, 278, 2042)efficientnet_b1_prunedfeature channels(16, 12, 35, 67, 320)efficientnet_b2_prunedfeature channels(16, 17, 42, 116, 352)efficientnet_b3_prunedfeature channels(24, 12, 40, 120, 384)
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working