MontaEllis / Pytorch-Medical-Segmentation

This repository is an unoffical PyTorch implementation of Medical segmentation in 2D and 3D.
MIT License
860 stars 196 forks source link

我用更新后的代码预测时出现了错误 #44

Closed ARnnn closed 2 years ago

ARnnn commented 2 years ago

我用您更新后的代码重新训练了模型,在预测时出现了这样的错误: File "main.py", line 519, in test aggregator_1.add_batch(labels, locations) File "/home/anran/.conda/envs/seg/lib/python3.6/site-packages/torchio/data/inference/aggregator.py", line 131, in add_batch self.patch_overlap, File "/home/anran/.conda/envs/seg/lib/python3.6/site-packages/torchio/data/inference/aggregator.py", line 82, in crop_batch diff = patch_shape - crop_shape ValueError: operands could not be broadcast together with shapes (2,) (3,)

请问要怎么解决

MontaEllis commented 2 years ago

Sorry, it is an error we missed. We have fixed it.

ARnnn commented 2 years ago

Sorry, it is an error we missed. We have fixed it.

I repaired it in the same way as you, but now the prediction results are all black. What's the problem. What I did was a dichotomy. During the test, there was such a warning:

image