kbressem / prostate158

MIT License
26 stars 7 forks source link

RuntimeError: Given transposed=1, weight of size [768, 128, 3, 3, 3], expected input[4, 512, 3, 3, 3] to have 768 channels, but got 512 channels instead #5

Closed Martiniger closed 4 months ago

Martiniger commented 1 year ago

Hello, I trained the model and I am having a problem evaluating it, because I get the following error:

RuntimeError: Given transposed=1, weight of size [768, 128, 3, 3, 3], expected input[4, 512, 3, 3, 3] to have 768 channels, but got 512 channels instead

I don't really know where the problem is and I would really appreciate your help.

error

kbressem commented 1 year ago

Can you provide more information (config file and code)

Martiniger commented 1 year ago

I used the code provided here and the config file is obtained from the anatomy.yaml file (I didn't change anything except for the paths)

kbressem commented 1 year ago

Sorry, for the late reply. It's hard for me to reproduce. In the screenshot you send me, you cut off the top so I cannot see were it goes wrong in the library but it only shows me the stack trace within PyTorch. This error is within the neural network configuration. Which is strange, as the same config is used for training and inference. But maybe it will become clear, when I can see where exactly it goes wrong in the library.

github-actions[bot] commented 4 months ago

Stale issue message