forward() got an unexpected keyword argument 'pre_logits'

#1
by Jolaris - opened

what happen?
model = timm.create_model(
"maxvit_base_tf_384.in1k",
pretrained=False,
num_classes=2,
pretrained_cfg_overlay=dict(file='../../model/maxVIT'),
)
simclr_dataset = CustomDataset(image_folder, xlsx_file, transform=simclr_transform)
simclr_dataloader = DataLoader(simclr_dataset, batch_size=4, shuffle=True, num_workers=2, drop_last=True, pin_memory=True)

PyTorch Image Models org

@Jolaris I believe the model.head module is being manually replaced by something that doesn't have the pre_logits argument. Next timm release will have a small change that makes that less likely to cause an issue.

Sign up or log in to comment