ZhaoZhibin / DL-based-Intelligent-Diagnosis-Benchmark

Source codes for the paper "Deep Learning Algorithms for Rotating Machinery Intelligent Diagnosis: An Open Source Benchmark Study"
MIT License
592 stars 164 forks source link

HELP #4

Open ChocalateWZLH opened 2 years ago

ChocalateWZLH commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

Thanks.

Timerezyx commented 2 years ago

您好,非常感谢您打开代码。 我在使用过程中遇到了一个问题。我跑过火车。 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

CMZS1314 commented 2 years ago

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 commented 2 years ago

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