qubvel / segmentation_models.pytorch

Semantic segmentation models with 500+ pretrained convolutional and transformer-based backbones.
https://smp.readthedocs.io/
MIT License
9.14k stars 1.63k forks source link

TypeError: preprocess_input() missing 1 required positional argument: 'x' #832

Closed MaimoonaJafar closed 5 months ago

MaimoonaJafar commented 8 months ago

train model for 40 epochs

max_score = 0

for i in range(0, 40):

print('\nEpoch: {}'.format(i))
train_logs = train_epoch.run(train_loader)
valid_logs = valid_epoch.run(valid_loader)

# do something (save model, change lr, etc.)
if max_score < valid_logs['iou_score']:
    max_score = valid_logs['iou_score']
    torch.save(model, './best_model.pth')
    print('Model saved!')

if i == 25:
    optimizer.param_groups[0]['lr'] = 1e-5
    print('Decrease decoder learning rate to 1e-5!')

I am constantly getting error in train_logs = train_epoch.run(train_loader)

TypeError: preprocess_input() missing 1 required positional argument: 'x'

How can it be resolved?

github-actions[bot] commented 6 months ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 5 months ago

This issue was closed because it has been stalled for 7 days with no activity.