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

HELP #4

Open
ChocalateWZLH opened this issue Jul 13, 2021 · 5 comments
Open

HELP #4

ChocalateWZLH opened this issue Jul 13, 2021 · 5 comments

Comments

@ChocalateWZLH
Copy link

Hello, thank you very much for opening the code.
I met a problem in the process of using it. I ran train. Py directly and reported an error:
File "C:/Users/Desktop/DL-based-Intelligent-Diagnosis-Benchmark/train.py", line 66, in
trainer.setup()
File "C:\Users\Desktop\DL-based-Intelligent-Diagnosis-Benchmark\utils\train_utils.py", line 63, in setup
self.model = getattr(models, args.model_name)(in_channel=Dataset.inputchannel, out_channel=Dataset.num_classes)
AttributeError: module 'models' has no attribute 'Inception2d'

Could you help me solve this problem?
I would appreciate it if you could reply me.

@ZhaoZhibin
Copy link
Owner

Hello, thank you very much for opening the code.
I met a problem in the process of using it. I ran train. Py directly and reported an error:
File "C:/Users/Desktop/DL-based-Intelligent-Diagnosis-Benchmark/train.py", line 66, in
trainer.setup()
File "C:\Users\Desktop\DL-based-Intelligent-Diagnosis-Benchmark\utils\train_utils.py", line 63, in setup
self.model = getattr(models, args.model_name)(in_channel=Dataset.inputchannel, out_channel=Dataset.num_classes)
AttributeError: module 'models' has no attribute 'Inception2d'

Could you help me solve this problem?
I would appreciate it if you could reply me.

We have not defined the model 'Inception2d'. We only defined the following models and you can use the following models.

from models.CNN_1d import CNN as cnn_1d
from models.CNN_2d import CNN as cnn_2d
from models.LeNet1d import LeNet as lenet_1d
from models.LeNet2d import LeNet as lenet_2d
from models.Resnet1d import resnet18 as resnet18_1d
from models.Resnet2d import resnet18 as resnet18_2d
from models.Alexnet1d import alexnet as alexnet_1d
from models.Alexnet2d import alexnet as alexnet_2d
from models.BiLSTM1d import BiLSTM as BiLSTM1d
from models.BiLSTM2d import BiLSTM as BiLSTM2d
import models.Ae1d as Ae1d
import models.Ae2d as Ae2d
import models.Dae1d as Dae1d
import models.Dae2d as Dae2d
import models.Sae1d as Sae1d
import models.Sae2d as Sae2d
from models.MLP import MLP

@ChocalateWZLH
Copy link
Author

Thanks.

@Timerezyx
Copy link

您好,非常感谢您打开代码。 我在使用过程中遇到了一个问题。我跑过火车。 py直接报错:File "C:/Users/Desktop/DL-based-Intelligent-Diagnosis-Benchmark/train.py", line 66, in trainer.setup() File "C:\Users\Desktop\DL -based-Intelligent-Diagnosis-Benchmark\utils\train_utils.py",第 63 行,在设置中 self.model = getattr(models, args.model_name)(in_channel=Dataset.inputchannel, out_channel=Dataset.num_classes) AttributeError: module '模型'没有属性'Inception2d'

你能帮我解决这个问题吗? 如果您能回复我,我将不胜感激。

Did you solve it? I have the same problem as you

@learn-chang
Copy link

Hello, thank you very much for opening the code.
I met a problem in the process of using it. I ran train. Py directly and reported an error:
File "C:\Users\cc\Desktop\DL-based-Intelligent-Diagnosis-Benchmark-master\utils\train_utils.py", line 67, in setup
self.model = getattr(models, args.model_name)(in_channel=Dataset.inputchannel, out_channel=Dataset.num_classes)
TypeError: 'module' object is not callable
can you help me solve this problems?
I would appreciate it if you could reply me.

@ZhaoZhibin
Copy link
Owner

Hello, thank you very much for opening the code. I met a problem in the process of using it. I ran train. Py directly and reported an error: File "C:\Users\cc\Desktop\DL-based-Intelligent-Diagnosis-Benchmark-master\utils\train_utils.py", line 67, in setup self.model = getattr(models, args.model_name)(in_channel=Dataset.inputchannel, out_channel=Dataset.num_classes) TypeError: 'module' object is not callable can you help me solve this problems? I would appreciate it if you could reply me.

We have not defined the model 'Inception2d'. We only defined the following models and you can use the following models.

from models.CNN_1d import CNN as cnn_1d
from models.CNN_2d import CNN as cnn_2d
from models.LeNet1d import LeNet as lenet_1d
from models.LeNet2d import LeNet as lenet_2d
from models.Resnet1d import resnet18 as resnet18_1d
from models.Resnet2d import resnet18 as resnet18_2d
from models.Alexnet1d import alexnet as alexnet_1d
from models.Alexnet2d import alexnet as alexnet_2d
from models.BiLSTM1d import BiLSTM as BiLSTM1d
from models.BiLSTM2d import BiLSTM as BiLSTM2d
import models.Ae1d as Ae1d
import models.Ae2d as Ae2d
import models.Dae1d as Dae1d
import models.Dae2d as Dae2d
import models.Sae1d as Sae1d
import models.Sae2d as Sae2d
from models.MLP import MLP

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

4 participants