Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在自己的电脑上运行您的代码 #15

Open
minchicken opened this issue Jul 25, 2023 · 1 comment
Open

如何在自己的电脑上运行您的代码 #15

minchicken opened this issue Jul 25, 2023 · 1 comment

Comments

@minchicken
Copy link

尊敬的作者,您好,我是一个研0的新生,老师让我用您的代码去实现特征提取和故障分类,但是我下载您的代码在pycharm上运行时发现有错误,错误如下所示,请问这种错误应该如何解决

D:\anaconda3\envs\pytorch\python.exe F:\算法总结\特征提取\InceptionNext\inceptionnext-main\models\inceptionnext.py
Traceback (most recent call last):
File "F:\算法总结\特征提取\InceptionNext\inceptionnext-main\models\inceptionnext.py", line 12, in
from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD
File "D:\anaconda3\envs\pytorch\Lib\site-packages\timm_init_.py", line 2, in
from .models import create_model, list_models, is_model, list_modules, model_entrypoint,
File "D:\anaconda3\envs\pytorch\Lib\site-packages\timm\models_init_.py", line 28, in
from .maxxvit import *
File "D:\anaconda3\envs\pytorch\Lib\site-packages\timm\models\maxxvit.py", line 216, in
@DataClass
^^^^^^^^^
File "D:\anaconda3\envs\pytorch\Lib\dataclasses.py", line 1230, in dataclass
return wrap(cls)
^^^^^^^^^
File "D:\anaconda3\envs\pytorch\Lib\dataclasses.py", line 1220, in wrap
return _process_class(cls, init, repr, eq, order, unsafe_hash,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda3\envs\pytorch\Lib\dataclasses.py", line 958, in _process_class
cls_fields.append(_get_field(cls, name, type, kw_only))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\anaconda3\envs\pytorch\Lib\dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'timm.models.maxxvit.MaxxVitConvCfg'> for field conv_cfg is not allowed: use default_factory

@yuweihao
Copy link
Collaborator

yuweihao commented Aug 8, 2023

Hi @minchicken,

Could you please check whether your Timm version is 0.6.11 or not?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants