Comments (3)
当我在用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 麻烦赵老师有空帮我解答一下。非常感谢
从问题来看应该是你同时使用了距离和对抗,因为距离的时候我们是丢掉最后一个batch的,不然维度不匹配没法计算距离,对抗的话不用丢弃最后一个batch。所以有可能这里面出现了矛盾,你可以仔细看一下。
from udtl.
from udtl.
感谢感谢
from udtl.
Related Issues (19)
- train_utils_combines.py line: 71 HOT 2
- reharding the 江南大学数据\数据/ib600_2.csv HOT 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. HOT 4
- 中文版的论文有吗。
- datasets -filenames HOT 2
- The size of tensor a (20) must match the size of tensor b (64) at non-singleton dimension 1 HOT 2
- 50 middle epoch HOT 1
- I cant find out the PHM09 dataset
- last_batch HOT 2
- hidden_size
- 您好 请问一下
- 您好 有一个问题您能给解答一下吗 HOT 4
- train_utils_base.py line170
- iter_target.next()
- 使用cwru_fft报错,希望解答下
- Dataset accessibility HOT 3
- cruw HOT 1
- 保存最佳模型参数代码的或许有用的建议
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from udtl.