Comments (6)
I followed your steps, but still have problems. Here are more details.
Environment: pytorch 1.11.0 py3.7_cuda11.3_cudnn8.2.0_0
Error Report:
File "/data/data/xxxx/ST/src/easytorch/launcher/launcher.py", line 93, in launch_training
train_dist(cfg)
File "/data/data/xxxx/ST/src/easytorch/launcher/launcher.py", line 56, in training_func
raise e
File "/data/data/xxxx/ST/src/easytorch/launcher/launcher.py", line 52, in training_func
runner.train(cfg)
File "/data/data/xxxx/ST/src/easytorch/core/runner.py", line 351, in train
loss = self.train_iters(epoch, iter_index, data)
File "/data/data/xxxx/ST/src/basicts/runners/short_mts_runner.py", line 186, in train_iters
prediction, real_value = self.forward(data=data, epoch=epoch, iter_num=iter_num, train=True)
File "/data/data/xxxx/ST/src/basicts/runners/GraphWaveNet_runner.py", line 54, in forward
prediction_data = self.model(history_data=history_data) # B, L, N, C
File "/data/data/xxxx/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/data/data/xxxx/ST/src/basicts/archs/GraphWaveNet_arch/GraphWaveNet_arch.py", line 188, in forward
gate = self.gate_convs[i](residual)
File "/data/data/xxxx/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/data/data/xxxx/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 302, in forward
return self._conv_forward(input, self.weight, self.bias)
File "/data/data/xxxx/anaconda3/envs/torch/lib/python3.7/site-packages/torch/nn/modules/conv.py", line 299, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [64, 32, 358, 13]
*: "xxxx" is my name, please ignore it.
Also, I check the code, and theoretically there should be this error.
nn.Conv1d
expects a 3-dimensional input in the shape [batch_size, channels, seq_len] while you are using a 4-dimensional input with shape [batch_size, channels, num_nodes, time_steps].
Btw, could you provide your email address that you use regularly?
from basicts.
Hi @Ethan1X ~ Thanks for your ideas, and this issue is indeed caused by the PyTorch version.
Although BasicTS itself does not have many requirements on the Pytorch version, some baselines may encounter compatibility issues in higher versions.
I would recommend you use versions 1.10.0
or 1.9.1
, which have been tested.
from basicts.
Thanks to the author for the update, here is another solution for fixing STGCN:
@ARCH_REGISTRY.register(name='STGCN')
from basicts.
Yes, thank you very much for reporting these errors to me. I have fixed the bug in STGCN.
However, I can't reproduce these errors in Graph WaveNet and STNorm. Here are my actions:
- clone the BasicTS project
git clone https://github.com/zezhishao/BasicTS.git
- download the raw_data and put them in
datasets/
- run scripts to preprocess PEMS03 dataset
python /path/to/BasicTS/scripts/data_preparation/PEMS03/generate_training_data.py
- run the model, e.g.,
easytrain -c basicts/options/STNorm/STNorm_PEMS03.py --gpus '0'
,easytrain -c basicts/options/GraphWaveNet/GraphWaveNet_PEMS03.py --gpus '0'
.
It looks like they work fine on all datasets on my computer. Do you have more information about these models or any changes to the code?
Please feel free to contact me if you have any questions.
from basicts.
I think it should be caused by different versions of pytorch.
You can contact me via email [email protected]
.
from basicts.
Hi, have you solved this problem? I'm having the same problem.
The analysis found that it may be a Torch version problem, refer to the link:
mengcz13/IJCAI2022_ST-KMRN#1 (comment)
from basicts.
Related Issues (20)
- 请问如何修改学习率衰减器 HOT 1
- 修改数据归一化方式。 HOT 1
- MS (multivariate -> univariate)? HOT 2
- 关于数据输入和输出特征个数的问题? HOT 2
- dataloader的droplast问题 HOT 2
- STGCN 模型不能跑第二次 HOT 1
- implementation of spatial indistinguishability HOT 1
- 能否支持early stop? HOT 1
- 您好,请教一下模型训练好后如何获取预测值与真实值的数据 HOT 5
- 怎么快速的修改输入输出长度,完成不同实验? HOT 1
- 关于训练速度 HOT 3
- 如何多卡训练 HOT 2
- 关于给模型增加额外输入的问题 HOT 1
- 关于TrainingMAE与ValidationMAE的大小 HOT 5
- 预测结果可视化时,results为空
- 关于预测结果可视化的问题 HOT 8
- 如何调参
- masked_wape在处理缺失值为nan时的问题 HOT 4
- 一些问题和优化建议 HOT 26
- 关于Embeddng可视化的问题 HOT 3
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 basicts.