ZhaoZhibin / UDTL

Source codes for the paper "Applications of Unsupervised Deep Transfer Learning to Intelligent Fault Diagnosis: A Survey and Comparative Study" published in TIM
MIT License
400 stars 103 forks source link

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. #3

Open yang301301 opened 2 years ago

yang301301 commented 2 years ago

您好!我在只修改数据集的情况下,报错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.请问您一下这是什么原因呢?非常感谢

yang301301 commented 2 years ago

每次训练到middle_epoch时就会报错。

ZhaoZhibin commented 2 years ago

每次训练到middle_epoch时就会报错。

我看报错的原因,应该是你的target domain的样本维度设置的不对,少了一个维度。

ZhaoZhibin commented 2 years ago

您好!我在只修改数据集的情况下,报错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.请问您一下这是什么原因呢?非常感谢

This is the problem with the version of Pytorch. I have fixed this issue. You can download the codes again.

yang301301 commented 2 years ago

谢谢您的回复!非常感谢!

------------------ 原始邮件 ------------------ 发件人: "ZhaoZhibin/UDTL" @.>; 发送时间: 2022年3月1日(星期二) 晚上8:57 @.>; @.**@.>; 主题: Re: [ZhaoZhibin/UDTL] 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. (Issue #3)

您好!我在只修改数据集的情况下,报错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.请问您一下这是什么原因呢?非常感谢

This is the problem with the version of Pytorch. I have fixed this issue. You can download the codes again.

— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.Message ID: @.***>