qsd-github
qsd-github
### 分支 main 分支 (mmpretrain 版本) ### 描述该错误 首先我是准备自己写一个模型,然后运行,我是先按照教程安装了mmpretrain的包,然后按照教程把对应的配置文件都配置好了,按照tools/train.py config/xxx.py运行后报我这个模型没有注册,问题在于它一直调用的是我安装的最初始的mmpretrain,所以找不到这个模型,然后我卸载掉,直接在mmpretrain包里面运行tools/train.py config/xxx.py,给我报KeyError: 'ImageClassifier is not in the mmengine::model registry. 我查看了github上相关的问题,第一种是需要安装mmpretrain,但是会产生第一个的问题,第二种是配置文件default_scope = 'mmpretrain',我已经配置好了,但是还是报错,我现在能运行的方式就是修改模型之后再次python setup.py install放入到python解释器里面,但是这样很麻烦,请问有什么办法解决这个问题或者说是我哪里操作不当导致的? ### 环境信息 tools/train.py config/xxx.py ### 其他信息 我不知道是不是我的操作问题还是啥?但是修改模型后每次导入这种操作很麻烦,请问官方如何解决这个问题?
My code is as follows: model, preprocess = clip.load("./weights/ViT-B-32.pt", device=device) image = preprocess(Image.open("./xxx.jpg")).unsqueeze(0).to(device) # only PIL library can be used here, using cv2 library will result in an error. I...