Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An error occured when running train.py. #8

Closed
neymar-jr opened this issue Feb 8, 2023 · 3 comments
Closed

An error occured when running train.py. #8

neymar-jr opened this issue Feb 8, 2023 · 3 comments

Comments

@neymar-jr
Copy link

neymar-jr commented Feb 8, 2023

A great job. Could you please help me with this?

Backbone # param.: 23561205
Learnable # param.: 2580968
Total # param.: 26142173

available GPUs: 8

Total (trn) images are : 13680
[Epoch: 00] [Batch: 0001/0684] L: 0.68105 Avg L: 0.68105 mIoU: 0.00 | FB-IoU: 33.25
[Epoch: 00] [Batch: 0051/0684] L: 0.43134 Avg L: 0.49445 mIoU: 0.00 | FB-IoU: 37.79
[Epoch: 00] [Batch: 0101/0684] L: 0.35394 Avg L: 0.45320 mIoU: 6.28 | FB-IoU: 41.73
[Epoch: 00] [Batch: 0151/0684] L: 0.34036 Avg L: 0.43587 mIoU: 18.09 | FB-IoU: 48.10
[Epoch: 00] [Batch: 0201/0684] L: 0.29183 Avg L: 0.42005 mIoU: 24.74 | FB-IoU: 51.72
[Epoch: 00] [Batch: 0251/0684] L: 0.36972 Avg L: 0.40563 mIoU: 28.04 | FB-IoU: 53.82
[Epoch: 00] [Batch: 0301/0684] L: 0.37294 Avg L: 0.39855 mIoU: 30.98 | FB-IoU: 55.46
[Epoch: 00] [Batch: 0351/0684] L: 0.29182 Avg L: 0.39139 mIoU: 33.15 | FB-IoU: 56.81
[Epoch: 00] [Batch: 0401/0684] L: 0.43611 Avg L: 0.38447 mIoU: 34.84 | FB-IoU: 57.90
[Epoch: 00] [Batch: 0451/0684] L: 0.36160 Avg L: 0.37885 mIoU: 36.57 | FB-IoU: 58.90
[Epoch: 00] [Batch: 0501/0684] L: 0.32845 Avg L: 0.37381 mIoU: 37.72 | FB-IoU: 59.63
[Epoch: 00] [Batch: 0551/0684] L: 0.39814 Avg L: 0.37052 mIoU: 38.67 | FB-IoU: 60.23
[Epoch: 00] [Batch: 0601/0684] L: 0.27711 Avg L: 0.36641 mIoU: 39.54 | FB-IoU: 60.77
[Epoch: 00] [Batch: 0651/0684] L: 0.39666 Avg L: 0.36396 mIoU: 39.98 | FB-IoU: 61.05

*** Training [@epoch 00] Avg L: 0.36293 mIoU: 40.47 FB-IoU: 61.37 ***

Traceback (most recent call last):
File "/home/liuxuanchen/Develop/cross-domain/PATNet/train.py", line 105, in
val_loss, val_miou, val_fb_iou = train(epoch, model, dataloader_val, optimizer, training=False)
File "/home/liuxuanchen/Develop/cross-domain/PATNet/train.py", line 47, in train
average_meter.write_result('Training' if training else 'Validation', epoch)
File "/home/liuxuanchen/Develop/cross-domain/PATNet/common/logger.py", line 61, in write_result
loss_buf = torch.stack(self.loss_buf)
RuntimeError: stack expects a non-empty TensorList

@neymar-jr neymar-jr changed the title An error occured when running the train.py. An error occured when running train.py. Feb 8, 2023
@neymar-jr
Copy link
Author

Sorry. I just mistook fss dataset's filepath. It runs well.

@slei109
Copy link
Owner

slei109 commented Apr 7, 2023

It seems your validation set is missing. You need to check the path of your validation set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@slei109 @neymar-jr and others