ViTAE-Transformer / MTP

The official repo for [JSTARS'24] "MTP: Advancing Remote Sensing Foundation Model via Multi-Task Pretraining"
MIT License
175 stars 11 forks source link

训练时报错 #26

Closed vaelaogudong closed 2 months ago

vaelaogudong commented 2 months ago

ModuleNotFoundError: No module named 'opencd.engine.optimizers' 打开文件发现opencd和您的项目都没有提供optimizers文件,想问这个报错怎么解决

DotWang commented 2 months ago

@vaelaogudong opencd是基于openmmlab的mmseg开发的,所以需要先安装必要的库:mmcv,mmengine,mmseg

vaelaogudong commented 2 months ago

我已经安装过openmmlab框架,经过排查,是/RS_Tasks_Finetune/Change_Detection/opencd/registry.py的如下代码OPTIMIZERS = Registry( 'optimizer', parent=MMENGINE_OPTIMIZERS, locations=['opencd.engine.optimizers'])

manage optimizer wrapper

OPTIM_WRAPPERS = Registry( 'optim_wrapper', parent=MMENGINE_OPTIM_WRAPPERS, locations=['opencd.engine.optimizers'])

manage constructors that customize the optimization hyperparameters.

OPTIM_WRAPPER_CONSTRUCTORS = Registry( 'optimizer wrapper constructor', parent=MMENGINE_OPTIM_WRAPPER_CONSTRUCTORS, locations=['opencd.engine.optimizers']) locations指向错误,将其指向您提供的mmcv_custom即可