zhaozhibin / udtl Goto Github PK
View Code? Open in Web Editor NEWSource codes for the paper "Applications of Unsupervised Deep Transfer Learning to Intelligent Fault Diagnosis: A Survey and Comparative Study" published in TIM
License: MIT License
Source codes for the paper "Applications of Unsupervised Deep Transfer Learning to Intelligent Fault Diagnosis: A Survey and Comparative Study" published in TIM
License: MIT License
请问cruw的数据集的文件夹组织结构是什么样的
hello!!
i was runnimg the train_base.py i was not babe to find the 江南大学数据\数据/ib600_2.csv file and it is raising error "OSError: /tmp/D:/Data\江南大学数据\数据/ib600_2.csv not found." please could you guide me to find the .csv file?
When I used the CWRU data set, using the adversarial method, THERE would be 50 epoch errors
ValueError: Using a target size (torch.Size([128])) that is different to the input size (torch.Size([128, 1])) is deprecated. Please ensure they have the same size.
What can I do to fix it that doesn't happen when I use SEU data sets
赵老师您好,您开源的代码对我帮助很大,十分感谢您。我在JN数据集上运行AdversarialNet网络,报了下面这个错,不知道如何解决,向您请教。再次感谢!
Traceback (most recent call last):
File "D:\Pycharmproject\TL\train_advanced.py", line 85, in
trainer.setup()
File "D:\Pycharmproject\TL\utils\train_utils_combines.py", line 64, in setup
self.model = getattr(models, args.model_name)(args.pretrained)
TypeError: init() missing 1 required positional argument: 'hidden_size'
When args.eval_all = False, is the for loop in line 170 and 160 duplicated?
当我在用CWRU数据集上由0到2迁移时,在middle epoch时报错:
Traceback (most recent call last):
File "E:\UDTL-master\train_advanced.py", line 88, in
trainer.train()
File "E:\UDTL-master\utils\train_utils_combines.py", line 286, in train
distance_loss = self.distance_loss([features.narrow(0, 0, labels.size(0)),
File "E:\UDTL-master\loss\JAN.py", line 44, in JAN
loss = torch.mean(XX + YY - XY - YX)
RuntimeError: The size of tensor a (20) must match the size of tensor b (64) at non-singleton dimension 1
在1迁移到2时则不会报错。
相应参数设置为:
04-09 11:14:17 model_name: resnet_mix_features_1d
04-09 11:14:17 data_name: CWRU
04-09 11:14:17 data_dir: E:\Data\CWRU
04-09 11:14:17 transfer_task: [[0], [2]]
04-09 11:14:17 normlizetype: mean-std
04-09 11:14:17 cuda_device: 0
04-09 11:14:17 checkpoint_dir: ./checkpoint
04-09 11:14:17 pretrained: False
04-09 11:14:17 batch_size: 64
04-09 11:14:17 num_workers: 0
04-09 11:14:17 bottleneck: True
04-09 11:14:17 bottleneck_num: 256
04-09 11:14:17 last_batch: False
04-09 11:14:17 distance_metric: True
04-09 11:14:17 distance_loss: JMMD
04-09 11:14:17 trade_off_distance: Step
04-09 11:14:17 lam_distance: 1
04-09 11:14:17 domain_adversarial: True
04-09 11:14:17 adversarial_loss: CDA
04-09 11:14:17 hidden_size: 1024
04-09 11:14:17 trade_off_adversarial: Step
04-09 11:14:17 lam_adversarial: 1
04-09 11:14:17 opt: adam
04-09 11:14:17 lr: 0.001
04-09 11:14:17 momentum: 0.9
04-09 11:14:17 weight_decay: 1e-05
04-09 11:14:17 lr_scheduler: step
04-09 11:14:17 gamma: 0.1
04-09 11:14:17 steps: 150, 250
04-09 11:14:17 middle_epoch: 5
04-09 11:14:17 max_epoch: 300
04-09 11:14:17 print_step: 50
04-09 11:14:17 using 1 gpus
麻烦赵老师有空帮我解答一下。非常感谢
When using Python 3.9.0, the following error will occur:
AttributeError: '_SingleProcessDataLoaderIter' object has no attribute 'next'
change line 260 target_inputs, _ = iter_target.next()
in utils/train_utils_combines.py
to target_inputs, _ = next(iter_target)
Thanks for your effort! This code helped me a lot : )
self.classifier_layer = nn.Linear(self.model.output_num(), Dataset.class_num)
->
self.classifier_layer = nn.Linear(self.model.output_num(), Dataset.num_classes) ?
I can not find ‘class_num’, should it be replaced with 'num_classes'?
赵老师 我刚接触故障诊断以及机器学习算法 您所使用的CRWU数据集可以分享一下吗 在网上下载的数据集显示了很多格式错误
Hi Dr. Zhao,
I am trying to reproduce the results using your code, however, some of the dataset is not accessible. Can you please share the link to download the dataset "PHM_Society_2009_Competition_Expanded_txt.zip"? The original link on the PHM website is broken. Much appreciated!
Many thanks
cwru_fft的时候出现维度不匹配,不知道怎么解决
stack expects each tensor to be equal size, but got [1, 15360] at entry 0 and [1, 15872] at entry 1
您好!我在只修改数据集的情况下,报错Using a target size (torch.Size([128])) that is different to the input size (torch.Size([128, 1])) is deprecated. Please ensure they have the same size.请问您一下这是什么原因呢?非常感谢
after 1024 data, the source becomes 20 and the target becomes 64, not equal.
I am thinking it was the problem of dataloader
赵老师 您好 麻烦请问一下 在标签不一致和多域模式下的UDTL 命令行代码怎么输入呢? 我在train_advanced.py中并没有找到相关的输入参数
麻烦您解惑一下 万分感激
When using MMD, the 50th epoch will be wrong, because the dimension of Batch is not matched, your parser
parser.add_argument('--last_batch', type=bool, default=False, help='whether using the last batch')
drop_last=(True if args.last_batch and x.split('_')[1] == 'train' else False))
The default should be True
train_utils_combines文件中的torch.save代码应该放到所有epoch结束之后。torch.save前面的if循环条件中or后面的循环条件应该去除。
How did the author import the data set of Southeast University,After I import the data, filename only has a CSV file and nothing else can be found
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.