lauraset / Super-resolution-building-height-estimation

33 stars 5 forks source link

Import Error #3

Closed Github-Thomas-Peng closed 1 month ago

Github-Thomas-Peng commented 2 months ago

in the file: mymodels.py from segmentation_models_pytorch.decoders.unet import UnetDecoder, UnetDecoder_noise But there is an error: ImportError: cannot import name 'UnetDecoder' from 'segmentation_models_pytorch.decoders.unet', And no module named UnetDecoder_noise. Please tell me How to solve it, thx.

gsenxu commented 1 month ago

Did you solve the problem?

gsenxu commented 1 month ago

from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder, UnetDecoder_noise ImportError: cannot import name 'UnetDecoder_noise' from 'segmentation_models_pytorch.decoders.unet.decoder'. How to solve this problem, thanks.

Dengzhiyong999 commented 1 month ago

I met the same problem.

Github-Thomas-Peng commented 1 month ago

from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder, UnetDecoder_noise ImportError: cannot import name 'UnetDecoder_noise' from 'segmentation_models_pytorch.decoders.unet.decoder'. How to solve this problem, thanks.

try this:

from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder, UnetDecoder_noise

from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder

lauraset commented 1 month ago

from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder, UnetDecoder_noise ImportError: cannot import name 'UnetDecoder_noise' from 'segmentation_models_pytorch.decoders.unet.decoder'. How to solve this problem, thanks.

try this: #from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder, UnetDecoder_noise from segmentation_models_pytorch.decoders.unet.decoder import UnetDecoder

Thanks, Peng. That's correct. @gsenxu @Github-Thomas-Peng . There are some useless codes.